decompose wave 5 — contract suite: audit-first split of the verification backlog (engines' columns already discharge most rows; map in review-wave-5's appendix), seven mechanism-grouped suite-row tasks (queue depth, scheduler, tx commit-atomicity, streams, locks, wakes, opts/backoff equivalence), two engine-side hardening tasks (sqlite commit-error arm, pg F-1 defense-in-depth), and the review-wave-5 gate that flips the engine specs to stable

This commit is contained in:
glm-5.3-flash committed 2026-10-10 05:37:53 +00:00
1 parent 9a00fb8a7e
commit 250511d480
11 files changed
+911 -2

No files matched your search

+71 -2
View File
@@ -1,6 +1,6 @@
---
status: draft
last_updated: 2026-10-09 (pg-fix-tx-wake landed — the second HIGH fix, retiring F-1's engine arm; wave 5's remaining gate is the fix batch's review gate)
last_updated: 2026-10-10 (wave-4 fix batch landed and gate-verified — review-wave-4-fixes passed; wave 5 decomposed)
---
# alkstore — Implementation plan
@@ -36,7 +36,7 @@ parallel).
| [2](#wave-2--sqlite-substrate-fork) | honker-core fork into `alkstore-sqlite/src/substrate/`: port, deltas, provenance, test floor | wave 1 (workspace scaffold only) | implemented + reviewed (2026-10-08) |
| [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: the cross-engine equivalence properties (core-contract.md §Verification backlog), version-stamped per ADR-017 | waves 3 + 4 | not yet decomposed |
| 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 | decomposed (2026-10-10) |
| 6 | Release readiness: crate docs, deployment matrix final pass, README (written last, honestly), publish prep; mem-engine and fuzzing decisions | wave 5 | not yet decomposed |
## Wave 1 — Foundations
@@ -181,6 +181,69 @@ natural realization — the mechanism name *is* the wake channel
streams), legal by construction under the shared namespace — with
the reserved reconnect-wake channel staying the only reserved string.
## Wave 5 — Contract suite
Filling the scaffolded suite (`alkstore-contract-suite`) with the
remaining verification-backlog rows and running the compatibility
gate. Waves 3 and 4 each landed a nine/ten-row backlog column; the
wave-5 decomposition started from an audit of what those columns
already discharge versus what the backlog still lacks.
**Already discharged by the engines' columns** (the wave-5 review
gate verifies each claim by reading the pinning row, not by trusting
the audit): name validation (the exemplar, incl. `schedule()`'s
queue-argument validation), the numeric-domain rows (extents +
durations), `encode_payload` typed failure + round-trip, the
`PayloadTooLarge` occurrence asymmetry (both engine-scoped arms),
drop-=-rollback no-ghosts, in-tx read-your-own-writes (which also
discharges the `save_offset_tx` exactly-once backlog row across
itself and the drop-rollback row), receiver close/save arms + monotone
composition (both columns), and — pinned engine-side rather than as
suite rows, per the sqlite-engine-integration task's scoping call —
plain-path SQLite open and the watcher-cadence knob
(`open_tests.rs`; SQLite-scoped backlog rows).
**Wave 5's task set** (the gaps):
- Queue depth: the job-handle validity predicate, the ADR-010 depth
properties (reclaim-eats-attempt, dead-letter moves, the
no-stranded-rows sweep), and M-1's retention-failure pin
(`suite-queue-depth-rows`).
- Scheduler: boundary fires, bounded catch-up, leadership discipline —
with a documented extension of the suite's determinism posture to
admit runner-driving rows (`suite-scheduler-rows`).
- Tx seam: `outbox_enqueue_tx` and `publish_with_key_tx`
commit-atomicity, plus N-5's `with_tx` panic-disposition probe —
the panic path pinned against real engines for the first time
(`suite-tx-commit-atomicity-rows`).
- Streams: the cross-engine ordering-equivalence row and the full
`trim_to` semantics row (`suite-stream-rows`).
- Locks: TTL/expiry re-acquisition and the concurrent-`try_lock`
loser posture — the SQLite busy-path is the open question the row
exists to answer (`suite-lock-rows`).
- Wakes: the pinned `WakeReceiver` shapes, tolerance-bounded
(`suite-wake-rows`).
- Arithmetic equivalence: the backoff-curve row and the two
wall-clock-adjacent opts-resolution legs the existing row deferred
to this wave (`suite-opts-backoff-rows`).
- Engine-side hardening riding the window: the wave-3 review's
deferred SQLite commit-error-arm coverage (`sqlite-commit-error-arm`)
and F-1's defense-in-depth candidates — explicitly not load-bearing
since `pg-fix-tx-wake` retired the flake's root cause
(`pg-suite-infra-hardening`).
- The review gate (`review-wave-5`): the backlog discharge audit,
stamp verification, green-on-both-engines, the parked-disposition
audit — and the gate that flips `engine-sqlite.md` /
`engine-postgres.md` to `stable`.
Judgment calls the decomposition parked in task Notes (the review
gate audits each): where the M-1 retention-failure pin, the
beyond-64-cap skip-forward leg, and the backoff 1-hour-cap leg land
when the public surface cannot express them (engine-side is the
expected answer, recorded per case); whether the scheduler rows
demand the pg fire-wake parity the wave-4 fix-batch gate recorded;
and what the SQLite lock busy-path actually returns under contention.
## Decided points
- **Contract-suite layout — option (a)**: a small internal
@@ -261,6 +324,12 @@ decomposes. Specific gates:
`tasks/review-wave-4.md`) and making `tx_publishes_compose_with_the_handle`
deterministic (20 consecutive solo runs green); the remaining fixes
ride the wave-4 fix-batch decomposition below.
- **Wave 5 decomposition** (2026-10-10) — audit-first: the engines'
backlog columns already discharge most of the §Verification backlog
(map recorded in `tasks/review-wave-5.md`'s appendix for the gate to
verify); the wave fills the gaps with seven suite-row tasks grouped
by mechanism, two engine-side hardening tasks, and the gate. See the
Wave 5 section.
- **Wave 4 decomposition** (2026-10-08) — shaped as wave 3's
structural twin; wave-3 outcomes absorbed (constructors exist;
arithmetic re-owned per engine; per-engine `@every` parser;