Repository navigation
v3.0.0 fix: retain window read admission through blocking cleanup - #373
Conversation
Share one completion owner across mapping and payload destruction so cancellation cannot release a reader slot before its work finishes. Preserve the public read APIs and caller deadline.
Keep blocking JoinError as TaskFailed and reserve Decode for malformed balances. Add focused error regressions and record reader completion, caller compatibility, and local validation. Refs #273
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fc37d12. Configure here.
Thermo review dispositions —
|
Keep the paging cursor private and return admission-owned state, reuse BlockingDrop mapping for payout digests and balance snapshots, and consolidate cleanup tests. Retain whole cleanup ownership through runtime shutdown and cover queued destructor panic; real PostgreSQL corruption coverage remains authoritative. Refs #273. Verified 15 focused tests, 267 library tests, 62 PostgreSQL integration tests, Clippy, and formatting without changing clocks, stored bytes, version, or Git signing configuration.
Thermo follow-up pushed —
|
|
Coordinator final verification: independent Fable verified fc37d12..fd490c0 as behavior-preserving, with 15 window unit tests and 19 PostgreSQL window-reference tests passing, plus Clippy and formatting. Admission ownership, truthful errors, canonical bytes, public APIs and meaningful test coverage remain intact; all initial review lanes and accepted fixes are accounted for, and current-head CI is green. Accuracy correction to the earlier ledger: the existing shutdown test exercises queued cleanup executing after shutdown, not a closure being discarded. The reviewer separately verified the actual discard path with a scratch probe; this is a nonblocking test-description correction, not a lifetime defect. No claim that the committed test proves discard coverage. Final verification is complete; no further behavioral fix requested. |
Summary
Retain window read admission until in-flight blocking mapping and every accumulated payload cleanup finish, including after cancellation. A shared admission owner transfers with each handoff and cleanup, so blocking-pool completion order cannot admit another read early.
Keep the paging cursor and consumer inside the private paging helper and return guarded state. Reuse the blocking mapping helper for payout-state digests and balance snapshots, and consolidate lifecycle tests. Retain the whole cleanup owner to guarantee payload-before-permit destruction even when runtime shutdown discards a queued closure.
Preserve the public read APIs, caller deadline, stored bytes, and issued revision identity. Payout-state blocking task failures remain
TaskFailed; actual balance corruption remainsDecode.Refs #273. This addresses the reader lifetime and error-classification activation gates; compact runtime activation and replacement-lease eligibility remain separate work.
Validation
Fresh local validation for
fd490c03a3cbf4ba0cc466a764c759ae98921d05:cargo clippy --locked -p qbit-prism-server --all-targets -- -D warnings,cargo fmt --all --check, and whitespace checks passed.Review status
Independent medium and Codex adversarial reviews found no actionable findings on the earlier head. Initial independent Fable adversarial review of
fc37d12found no refutation, as reported by the coordinator. The thermo findings were verified and dispositioned in the initial ledger and tested follow-up.Focused independent verification of the final head and final-head CI remain pending; the full review battery is not marked complete. No version bump or merge was performed, and Git signing configuration was preserved.
The ownership contract, caller audit, and reproduction commands are documented in
docs/window-reader-lifetime.md.