Repository navigation
fix(persist): retry dirty content stores on graceful flush - #1534
Conversation
[bot] 🏷 Review complete — verdict: mergeable. ✅ ① Issue direction (#1533) — reproduced against code, bug is real and the fix hits the root cause. Every save path piggybacks the content-store write ( ② Regression review — existing behaviors on touched paths:
Behavior change (intended, flagged per policy): old — a content store left dirty by a transient failure stayed unwritten through graceful shutdown (data loss); new — one synchronous retry write per dirty session during ③ Code — minimal and correct; ④ Test quality — real teeth. Beyond your verification claims, I independently ran the mutation check on PR head: restoring the old ⑤ Diff cleanliness — 2 files, every line purpose-related, no whitespace/lockfile churn. Base is current master (86e0b68), §7.4 auto-merge gate: all 8 criteria met (single-module fix, regression test reproduces+passes, green on rebased head, no config/persistence-format/wire/cross-repo changes, pure |
|
Deep review complete — mergeable. Verified independently:
Nice catch, and thanks for the second contribution in a row. |
[bot] 🏷 Thanks for the deep-review pass. One independent datapoint on your environment-drift call: I confirmed master and PR head pin Nothing further from my side — review record stands: mergeable, §7.4 gate satisfied, merge is yours. |
Summary
SessionStore.flushAll()before draining the kernel state store.flushAll()call shape with an empty iterable default.Fixes #1533
Verification
node --import tsx --test tests/store.test.ts— 23 passed.node --import tsx --test tests/store.test.ts tests/side-request-isolation.test.ts— 37 passed.node --import tsx --test tests/proxy-persist.test.ts tests/persist-stats-roundtrip.test.ts tests/persist-rollback-guard.test.ts— 30 passed.tsc --noEmit --project tsconfig.build.json— passed.flushAll()implementation makes the new regression test fail; restoring the fix makes it pass.The regression and verification runs were executed against the latest upstream master in the isolated WSL Docker review environment.