pingqiuandClaude Opus 5.5 5eeb4ddf6e storage: #252 fold: the WAL writer checks the command budget before its first payload write
Review fold (codex01 r4 residual P1): the post-rollover check still preceded
w.append's descriptor snapshot, writer lock wait and encoding; a concurrent
Sync's slot write can hold the descriptor lock (without the store lock)
until the command expires. walWriterV3.append now takes the budget and
checks it after those waits and the encoding, before the first physical
write (no cancellation of a write already started). Red test:
TestWALStoreV3WriteBudgetRefusesAfterDescriptorWaitBehindSync (a real Sync
parked at its leader point, released after the write's rollover snapshot,
holding the descriptor lock in its slot write until expiry).

P2: codex03's TestWALStoreV3WriteBudgetRechecksAfterRollover (real pinned
fallback, rollover slot I/O held/faulted; expired/healthy/fault) and
TestWALStoreV3LocalBudgetIncludesWitnessedCaptureWait from his local
amendment evidence; test cleanup joins are bounded; the invariant ledger
names the current tests and the short-lock/writer-budget rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 03:51:25 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%