Repository navigation
3.x.x: bound refresh snapshot payload reads - #466
Conversation
Move an exclusively retained suffix into fresh ledger acquisition, validate single-leaf incarnation and complete eligible membership, and read only a bounded appended page before trimming. Preserve hashes, authority and cancellation admission, with conservative full-read fallback. Add same-anchor PostgreSQL differential and cancellation coverage plus the 400k paired qualification record. Median last-client latency improves 30.11% in the measured one-frontend workload; the one-second goal remains unmet and partition-crossing fallback overhead remains explicit. Refs #275 Co-Authored-By: OpenAI Codex <[email protected]>
This comment has been minimized.
This comment has been minimized.
The checkout census enrolls calls named advance because the rollup helper accepts a pool. Snapshot delta advance instead receives the existing transaction, so classify this exact call under the borrowed policy without changing any checkout, timer or scanner rule. The real-source gate and all 14 guard tests, including negative controls, pass after reproducing the unclassified-call failure. Refs #275 Co-Authored-By: OpenAI Codex <[email protected]>
|
@cursor review |
|
Review update for A second physical case keeps the entire newest share unchanged while replacing an interior fixture row, so checking only the newest row is insufficient. A conservative session-based prototype passed 11 focused PostgreSQL tests, including full-reader authentication after both physical replacements, but its matched 400k screening pair showed no useful gain: base 2.909416534 seconds versus candidate 2.912040278 seconds. Both cases reconciled all 2,000 durable identities and missed one second; this single screening pair is not the required balanced-pair median qualification. The rejected prototype has been preserved separately and the checkout restored to the unchanged published head. No repair was committed or pushed, and the required history-fence and documentation findings remain open. A sufficient bounded repair and fresh qualification are still required before this PR can be considered ready. |
|
Repair checkpoint at 326a88c: the insertion-timeline witness and physical PostgreSQL promotion/rejoin regressions are now pushed. The author reports 37 targeted tests plus workspace Clippy passing. Matched pool16, 400k-share/2,000-session qualification has four balanced pairs: baseline median 2.704 s versus candidate 1.771 s, median paired improvement 937 ms / 34.66%, versus 32 ms A/A noise. All 32,000 measured job identities reconcile; every large case still misses the one-second target. Independent Fable delta verification is now running on this exact head, specifically challenging the history proof against the existing D3/D5 procedures, interior-replacement and re-promotion tests, and benchmark provenance. The prior four review lanes remain attributed to their original head; this is targeted verification of the repair, not a claim they reviewed new code. The two prior required findings remain pending independent disposition, and current-head CI is still running. Not yet merge-ready. |
|
@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 326a88c. Configure here.
Final deep-review closeout — merge-readyPinned head: Review coverage and evidence
Deduplicated finding dispositions
Limits retained, not silently waivedThe supported D3 procedure is one eligible standby, positive old-writer fencing, The pre-existing as-is reuse predicate remains unchanged; this repair covers the new delta acquisition proof, not a claim to eliminate every baseline reuse limitation. Metadata counting remains O(window). Production hit rate,500k/two-frontend/network performance, memory soak and separately requalified fallback latency are not established here. The two minor final-review suggestions are clarified above: promotion must end recovery per D3; Cargo This supersedes the earlier “pending verification” checkpoint. No additional required source commit or review lane is outstanding for this pinned head; the next optimization is separate. |
…offer, and stop issuing that work after an async promotion (#619) Rebased onto 3.x.x 3f1fba6 (#642, #644) as one commit. It squashes the series that was PR #645's head 60efddd: - 263e4cd reproduce blocks on gap-issued work after an async promotion without qbitd, and weigh the options - 37b1af7 require the mode 2 reproduction's new session to be issued readable work, not just any refusal - 2fa8c80 refuse a block on work from a lost replication gap before its offer, and stop issuing that work after an async promotion - 850547e document the refusal: the accepted D3 loss, the runbook for an already-offered block, and the decided design - 7d229ac assert each test's outcome before its metric checks - e7468f4 record the before/after runs in the design note - c0a8018 tag work with the scan's timeline, name window_not_held in deferrals, count late refusals once, and pin the probe-error, out-of-order and clock cases - 60efddd state the clock precondition and correct the runbook Before a candidate is enqueued, the enqueue transaction checks that the writer still holds the candidate's PPLNS window: the window's last share row must exist and must be the window's own row. If it does not, the block is refused as stale-job (window_not_held) and is never offered. Prepared work is tagged with the writer timeline (#466's expression, read in the scan transaction), so a promotion retires it, and issuance authority refuses a window the promoted writer no longer holds. The repair path and save_compact_prepared now require the endpoint to be the window's own row, not just any row with that share_seq. Every b619 reproduction now passes and is gated. The only conflict was the cardinality pins: they become 77 families, 305 startup series and 956 populated series. These are 3.x.x's new families and series plus this series' own. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…offer, and stop issuing that work after an async promotion (#619) (#645) * 3.x.x: refuse a block on work from a lost replication gap before its offer, and stop issuing that work after an async promotion (#619) Rebased onto 3.x.x 3f1fba6 (#642, #644) as one commit. It squashes the series that was PR #645's head 60efddd: - 263e4cd reproduce blocks on gap-issued work after an async promotion without qbitd, and weigh the options - 37b1af7 require the mode 2 reproduction's new session to be issued readable work, not just any refusal - 2fa8c80 refuse a block on work from a lost replication gap before its offer, and stop issuing that work after an async promotion - 850547e document the refusal: the accepted D3 loss, the runbook for an already-offered block, and the decided design - 7d229ac assert each test's outcome before its metric checks - e7468f4 record the before/after runs in the design note - c0a8018 tag work with the scan's timeline, name window_not_held in deferrals, count late refusals once, and pin the probe-error, out-of-order and clock cases - 60efddd state the clock precondition and correct the runbook Before a candidate is enqueued, the enqueue transaction checks that the writer still holds the candidate's PPLNS window: the window's last share row must exist and must be the window's own row. If it does not, the block is refused as stale-job (window_not_held) and is never offered. Prepared work is tagged with the writer timeline (#466's expression, read in the scan transaction), so a promotion retires it, and issuance authority refuses a window the promoted writer no longer holds. The repair path and save_compact_prepared now require the endpoint to be the window's own row, not just any row with that share_seq. Every b619 reproduction now passes and is gated. The only conflict was the cardinality pins: they become 77 families, 305 startup series and 956 populated series. These are 3.x.x's new families and series plus this series' own. Co-Authored-By: Claude Opus 5.5 <[email protected]> * 3.x.x: classify #619's two pool checkouts, and pin the refusal at enqueue of a window that reaches past its anchor (#619) CI on 384eb2a failed two checks for this PR's own reasons. - The pool-acquire guard needs every checkout classified. Two new sites are classified "ledger" (delegated), like the existing Ledger::acquire sites: the landing's window probe in coordinator.rs::rebuild_claim_parts, and WorkLedger::window_held. - audit_body_normalization's durable-range test built a window that ends with a share accepted after the anchor. It expected the landing's proof to refuse that window. The enqueue's #619 check now refuses it first, because the last row is not held at the anchor. The case now asserts that refusal: it is typed WindowNotHeld for the block and its last share_seq, nothing is pending, and no block or audit row is written. The other three cases still reach the landing's proof. Share history is immutable, so a candidate enqueued before this check existed cannot be built to reach the proof's final count. Co-Authored-By: Claude Opus 5.5 <[email protected]> * 3.x.x: list #619's two gated lib tests in the expected gate list (#619) The gate proof on 5c261ad found two gated tests that ran but are not in test/prism-gated-tests.txt. Both are lib tests from the #619 review round: - coordinator::miner_submit::acquire_tests:: a_failed_window_probe_is_unknown_never_stale_and_enqueues_nothing - ledger::window::payout_state::tests:: a_snapshot_reads_its_writer_timeline_in_the_transaction_that_reads_its_rows The list now holds 804 tests, the same number the proof saw run. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Fresh payout revisions, balance changes and reanchors can reuse exclusively owned share payloads, read one bounded page of appended shares, and trim with the existing weight rule. Each acquisition still reads fresh anchor, cutoff, balances and revision and preserves the existing publication and cancellation checks.
The runtime witness now includes the current WAL insertion timeline alongside the live partition incarnation and eligible-row count. Supported asynchronous promotion therefore invalidates retained rows even when physical replication preserves OID, catalog incarnation, count and the newest row. The proof follows the existing single-standby D3 promotion/rejoin and stopped-frontend D5 recovery boundaries; timeline numbers are not globally unique across independent sibling copies.
Refs #275. Every 400k case still misses one second. This does not establish production eligibility rates, 500k or two-frontend performance, real-network results, or a memory soak. Metadata counting remains O(window), and fallback latency has not been separately requalified for the timeline repair.
The qualification report records the matched observations, binary provenance and limits; the acquisition contract explains the existing supported-history boundary. Independent repair-delta verification and exact-head CI/Bugbot are complete. The final review ledger records 5 fixed, 14 rebutted/declined suggestions, and zero open required findings. Merge-ready at the pinned head; reaching one second remains separate #275 work. No merge or deployment has been performed.