Wave-6 decomposition (mem engine): eleven tasks per the pg-wave rhythm — foundations (crate scaffold, MemStore::new isolation, guarded state core, wake routing, wasm32 gate from birth), seam-tx (the load-bearing tx overlay: eleven staged _tx methods, commit-merge + wake-at-commit — pg-fix-tx-wake's discipline structural from the start, drop = discard trivial, with_tx panic posture), mechanisms mutually parallel (notify-listen close-at-engine-drop/no-replay/never-coalesced; queues = ADR-010 machine driver-free with the equal-jitter curve and opts resolution as ADR-012 §2's third owner; streams log+offsets+trim; locks TTL registry, no busy-path analog), scheduler-outbox (tick/catch-up-64/leadership through the __alkstore_scheduler lock, engine-uniform per ADR-009 §4; outbox over queues with the 60/5/5 seam stamp), integration (suite third StoreFactory column green on host under a current-thread flavor, wasm32 acceptance items, engine-mem.md to implementation-complete), and the review-wave-6 gate (born-pinned audit: conformance read, discharge-map wiring, wasm items, three-way equivalence green, class-1 window discipline). Window riders: suite-harness-current-thread — the wave's one suite-side pre-task, past_stamp_sleep's blocking sleep goes async per review 003's properties.rs:1683 posture note, enabling the current-thread flavor; pg-fix-scheduler-tick-seam — review 003 Finding 1, the cfg(test) transient-fault seam driving the real tick_with_retries through retry-then-success and exhaustion arms (the last uncovered wave-4 hardening arm, sqlite-commit-error-arm pattern). Task hygiene: pg-fix-open-path frontmatter fixed (unquoted 'max_size: 0' colon-space inside the name scalar broke YAML parsing — taskgraph validate had been red one-error since the wave-4 fix-batch decomposition; also restores review-wave-4-fixes' dependency resolution). implementation.md: wave-6 table row → decomposed, task-set listing with the parallelism note (rider + pre-task independent of the mem chain; rider closes before the gate), wave-6 decomposition bullet in the review-rounds record. Docs-only change; verified taskgraph validate (60 tasks, no cycles), cargo fmt --check, cross-reference read

This commit is contained in:
glm-5.3-flash committed 2026-10-10 09:57:01 +00:00
1 parent 060f262e62
commit 5abd351c86
13 files changed
+939 -5

No files matched your search

+54 -4
View File
@@ -1,8 +1,9 @@
---
status: draft
last_updated: 2026-10-10 (ADR-024 — the mem engine adopted as wave 6
and decomposed-in-place documentation; release readiness renumbered
to wave 7. Waves 1–5 implemented and reviewed; engine specs stable.)
last_updated: 2026-10-10 (ADR-024 — the mem engine adopted as wave 6,
release readiness renumbered to wave 7; wave 6 decomposed — eleven
tasks per the pg-wave rhythm with the tx overlay load-bearing. Waves
1–5 implemented and reviewed; engine specs stable.)
---
# alkstore — Implementation plan
@@ -41,7 +42,7 @@ core crate plus the finished suite (wave 5) — born pinned, per
| [3](#wave-3--sqlite-engine) | SQLite engine: connection architecture, re-derived queue ops on contract v1, scheduler/outbox, tx seam, SQLite backlog column | waves 1 + 2 | implemented + reviewed (2026-10-08) |
| 4 | [Postgres engine](#wave-4--postgres-engine): schema bootstrap, pool/open, listener/forwarder, all mechanisms, tx seam, pg backlog column | wave 1 | implemented + reviewed (2026-10-08) |
| 5 | [Contract suite](#wave-5--contract-suite): the cross-engine equivalence properties (core-contract.md §Verification backlog), version-stamped per ADR-017 | waves 3 + 4 | implemented + reviewed (2026-10-10) |
| 6 | [Mem engine](#wave-6--mem-engine): separate `alkstore-mem` crate, full contract v1 over in-memory mechanisms (tx overlay, queue/scheduler/streams/locks/wakes), the suite's third factory column (born pinned), wasm32 compile-clean acceptance | waves 1 + 5 | not yet decomposed |
| 6 | [Mem engine](#wave-6--mem-engine): separate `alkstore-mem` crate, full contract v1 over in-memory mechanisms (tx overlay, queue/scheduler/streams/locks/wakes), the suite's third factory column (born pinned), wasm32 compile-clean acceptance | waves 1 + 5 | decomposed (2026-10-10) |
| 7 | [Release readiness](#wave-7--release-readiness): crate docs, deployment matrix final pass, README (written last, honestly), publish prep; fuzzing decision | wave 6 | not yet decomposed |
## Wave 1 — Foundations
@@ -311,6 +312,49 @@ transient-error retry loop, MEDIUM — engine-side, small,
mem-independent); Findings 2–3 follow their park recommendation into
wave 7's pre-release pass.
**Wave 6's task set** (the decomposition, 2026-10-10 — the pg wave's
rhythm: foundations → seam → mechanisms in parallel → scheduler/outbox
→ integration → review gate):
- `mem-engine-foundations` — crate scaffold (core + tokio sync+time
only), `MemStore::new()` isolation, guarded state core, wake-routing
substrate, clock accessor; the wasm32 compile gate starts here and
stays green onward.
- `mem-engine-seam-tx` — the load-bearing task: the tx overlay (all
eleven `*_tx` staged, commit-merge + wake-at-commit, drop =
discard, `with_tx` panic posture) + the `Store` trait surface +
entry-point numeric-domain guards (`suite-tx-commit-atomicity-rows`
is what consumes it once integrated).
- `mem-engine-notify-listen` — channels wake substrate surface,
three recv forms, close-at-engine-drop, no-replay, never coalesced;
depends on the seam (tx-staged notify).
- `mem-engine-queues` — the ADR-010 state machine driver-free;
equal-jitter curve and opts resolution as the third owner.
- `mem-engine-streams` — in-memory log, per-consumer offsets,
`trim_to`, receiver arms.
- `mem-engine-locks` — TTL registry; the SQLite busy-path question
has no mem analog (loser is a clean `None`).
- `mem-engine-scheduler-outbox` — tick/boundary/catch-up/leadership
through the reserved scheduler lock; outbox over queues.
- `suite-harness-current-thread` — the wave's one suite-side pre-task
(async `past_stamp_sleep`); engine-independent, required before the
mem column's current-thread flavor.
- `mem-engine-integration` — full-surface wiring, the suite's third
`StoreFactory` column green on host under the current-thread
flavor, the wasm32 acceptance items, `engine-mem.md` to
implementation-complete.
- `pg-fix-scheduler-tick-seam` — review 003 Finding 1, riding the
window (engine-side, mem-independent; the last uncovered wave-4
hardening arm).
- `review-wave-6` — the born-pinned gate: conformance read, third-
column discharge audit, wasm acceptance audit, spec disposition;
depends on integration + the rider so the window closes everything.
Parallelism note: the foundation task blocks the seam; the seam blocks
the mechanisms; the mechanisms are mutually parallel. The suite pre-task
and the Findings-1 rider are independent of the mem chain entirely and
can run any time in the window (the rider must close before the gate).
## Wave 7 — Release readiness
The original wave 6, renumbered when the mem engine inserted at wave
@@ -446,6 +490,12 @@ decomposes. Specific gates:
structural twin; wave-3 outcomes absorbed (constructors exist;
arithmetic re-owned per engine; per-engine `@every` parser;
SQLite-scoped deferred notes stay put). See the Wave 4 section.
- **Wave 6 decomposition** (2026-10-10) — ADR-024 adopted the mem
engine the same day the wave-5 gate closed; the task set follows the
pg wave's rhythm with the tx overlay as the load-bearing task, the
suite's third column as the born-pinned deliverable, the harness's
async-sleep pre-task, and review 003 Finding 1 riding the window.
See the Wave 6 section.
- **Wave-4 fix-batch decomposition** (2026-10-09) — the general
review's findings decomposed into seven `pg-fix-*` tasks + a
`review-wave-4-fixes` gate: Finding 1 → `pg-fix-forwarder-reconnect`