pg-fix-scheduler-fire-wake — the scheduler tick's fire wake lands, closing the recorded cross-engine fire-wake latency-parity gap (the wave-5 gate's one standing item, review-wave-4-fixes' recorded-for-later note): scheduler.rs::tick now issues one coalesced pg_notify per firing schedule per tick after the fire loop, still inside the tick's in_tx frame — channel = the fired queue's name (schedule() rejects reserved names per ADR-021 §3, so the plain queue name is always the right channel), empty payload (Wake { channel } only, ADR-008 §3), best-effort via the shared tx::wake_tx (widened private → pub(crate) per the recorded one-call shape; enqueue_row stays wake-free — no double-wake; auto-commit Queue::enqueue and the tx producer paths untouched). NOTIFY's native transactional delivery makes the wake commit-atomic: a rolled-back tick (crash mid-tick ⇒ boundary refires) discards the wake with its fire rows — the tx/no-ghosts discipline the tx producer paths already pin; coalescing default one-per-firing-schedule-per-tick (not per-fire) matching the SQLite watcher's per-committed-tick cadence, decision recorded in the task's Notes. New four-arm pinning test (scheduler_tests.rs, tx_producer_wakes_are_commit_atomic pattern): pre-commit silence inside the runner's own in_tx frame driving the engine's own tick (rogue-ticks shape), deterministic delivery at/after commit, coalescing (≥2 boundaries → one wake), nothing-due silence (same-tick not-due schedule + a later all-not-due tick, in-frame and post-commit), and the end-to-end runner leg (a live run_schedules leader's wake reaches a registered listener); local listener_hears helper per the per-file helper convention; rollback arm native (NOTIFY transactional delivery — no tick-fault seam built, per the task pin). Docs: tx.rs 'The tx wakes' section + wake_tx doc name the scheduler fire path as a shared caller; scheduler.rs module docs + tick doc pin the coalesced commit-atomic semantics. Record updates: review-wave-4-fixes' recorded-for-later bullet, suite-scheduler-rows' gate disposition note + Notes bullet, review-wave-5 §Notes 4's audit row — all retired with pointers; implementation.md gains the review-rounds line (fires visible to registered listeners ahead of the mem engine's posture being written). Also carried: review-wave-5 §6 flake-ledger update — row_lock_ttl_expiry_and_reacquisition failed once more in a full pg run this session (green on the next two full runs + six focused; unrelated mechanism to this change), meeting the ledger's own 'fails again' trigger with the dedicated investigative session owed by the wave-7 watch carriage. Verified: full pg lib suite 122/122 vs the harness (new test green ×3 solo); pg contract suite 25/25 + schema 9/9; workspace cargo test green server-less (pg skips clean incl. the new test); clippy --all-targets -D warnings clean; fmt clean
This commit is contained in:
1 parent
5abd351c86
commit
57451cef46
8 files changed
+538
-14
No files matched your search
@@ -3,7 +3,9 @@ status: draft
|
||||
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.)
|
||||
1–5 implemented and reviewed; engine specs stable. Wave-5 review
|
||||
residue decomposed — pg-fix-scheduler-fire-wake; flake-watch carried
|
||||
to wave 7.)
|
||||
---
|
||||
|
||||
# alkstore — Implementation plan
|
||||
@@ -364,7 +366,11 @@ the crate README (written last, honestly), publish prep, N-1's
|
||||
growth-posture review — and the **fuzzing decision** (the
|
||||
alksocks/alktty/alktunnels pattern), the one remaining
|
||||
decided-at-implementation deferral. Decomposes after wave 6's review
|
||||
gate, with review 003's Findings 2–3 riding the pre-release pass.
|
||||
gate, with review 003's Findings 2–3 riding the pre-release pass, and
|
||||
the wave-5 gate's flake-watch flag carried
|
||||
(`tasks/review-wave-5.md` §Notes 6 — the two unreproducible pg row
|
||||
failures; if either reproduces, a dedicated investigative session
|
||||
before any postulate-and-fix).
|
||||
|
||||
## Decided points
|
||||
|
||||
@@ -496,6 +502,23 @@ decomposes. Specific gates:
|
||||
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-5 residue decomposition** (2026-10-10) — the wave-5 review's
|
||||
outstanding items audited post-gate: the one recorded "for a later
|
||||
task" gap (scheduler fire-wake latency parity) decomposed as
|
||||
`pg-fix-scheduler-fire-wake` (pre-wave-6, standalone); the flake-watch
|
||||
flag carried into the wave-7 section above; review 003's Finding 1
|
||||
already decomposed (`pg-fix-scheduler-tick-seam`, the wave-6 rider)
|
||||
and Findings 2–3 already parked to wave 7. See the Wave 7 section for
|
||||
the watch carriage.
|
||||
- **Wave-5 residue closure** (2026-10-10) — the remaining
|
||||
"recorded for a later task" item landed: `pg-fix-scheduler-fire-wake`
|
||||
closed the scheduler fire-wake latency-parity gap (the tick's
|
||||
in-tx fires now issue their commit-atomic `pg_notify` wake, one
|
||||
coalesced wake per firing schedule per tick); the three gap records
|
||||
(`review-wave-4-fixes`'s recorded-for-later note, `suite-scheduler-rows`'s
|
||||
disposition note + Notes bullet, `review-wave-5` §Notes 4's audit row)
|
||||
retired with pointers, keeping the mem engine's fire posture written
|
||||
against a closed gap before wave 6.
|
||||
- **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`
|
||||
|
||||
Reference in new issue
Block a user