Skip to content

Carry post-merge review hardening for the accepted-block gap fix (#93) - #94

Merged
RobertClarke merged 2 commits into
1.x.xfrom
close-accepted-block-gap-followups
Jul 26, 2026
Merged

RobertClarke merged 2 commits into
1.x.xfrom
close-accepted-block-gap-followups

Conversation

@RobertClarke

@RobertClarke RobertClarke commented Jul 26, 2026 •

Copy link
Copy Markdown
Member

Summary

PR #93 merged at 22:56Z while its review loop was still converging; two review rounds landed after the merge point and this PR carries them onto 1.x.x unchanged (the tree here is byte-identical to the final fully-reviewed state of the #93 branch):

  • Late-gate re-probe (Bugbot, Medium): an unknown pre-withdrawal chain-probe verdict re-probes after the blocking payout-preview withdrawal, so a buried accepted block whose own hash was never re-observed as the tip (blockwait reports only the newest of rapid connects) defers on the recovered probe alone; provably wrong-height verdicts stay immutable and are never re-probed
  • Fail-safe replay reads (Bugbot, Medium): startup replay treats a failed pool_block_state read as protection rather than absence of proof — the candidate replays with restored acceptance evidence bounded by the observation window instead of racing a transient fork view unprotected
  • Retain-path re-registration (Codex P2 + Bugbot High): _retain_block_candidate_for_retry re-registers the hash for tip-observation matching the moment a sealed terminal pass aborts (prepared-row rejection or the durable outbox update raising), so acceptance evidence arriving during retry backoff registers again instead of vanishing behind the disposition seal; the same-pass seal exclusion is unchanged

Bugbot's post-merge High on #93 ("Retain path omits outstanding re-register") describes the merged code exactly — the third item here is its fix.

Deployment

Deploy together with (or immediately after) #93's merge commit d3ab0d1 as part of the same-day rollout; these close review-identified corner cases in #93's own protections. Do NOT roll back the pin.

Validation

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Medium Risk
Changes timing and evidence rules in accepted-block abandonment and payout-preview coordination; mistakes could still wrongly abandon or defer candidates, but scope is narrow defensive fixes with matching unit tests.

Overview
Follow-up hardening on the prism coordinator’s accepted-block gap protections from #93, closing review-identified races where terminal abandonment or replay could drop real accepts.

Startup replay now treats a failed pool_block_state read like proven prepared/confirmed state: it restores outstanding-candidate and tip-observation evidence (bounded by the observation window) instead of replaying unprotected against a transient fork view.

Terminal abandon runs a second chain probe after the blocking payout-preview withdrawal when the first probe was inconclusive, so a buried accepted block can defer abandonment on recovered probe truth even when blockwait never re-reports that hash as tip; a provably wrong-height probe still wins and is not re-probed.

Retry retention immediately re-registers the candidate hash for tip-observation matching when a sealed terminal pass aborts and the block is retained, so acceptance evidence during retry backoff is not lost behind the disposition seal.

Reviewed by Cursor Bugbot for commit 68aae45. Bugbot is set up for automated code reviews on this repo. Configure here.

admin and others added 2 commits July 25, 2026 20:36
…eads

- an unknown pre-withdrawal probe verdict re-probes the chain after the
  blocking payout-preview withdrawal: a buried accepted block is not
  always re-observed as the tip (blockwait reports only the newest of
  rapid connects), so a healed view must be able to defer the terminal
  commit on its own; provably wrong-height verdicts stay immutable
- startup replay treats a failed pool_block_state read as protection,
  not absence of proof: the candidate replays with restored acceptance
  evidence bounded by the observation window instead of racing a
  transient fork view unprotected after a flaky read

Co-Authored-By: Claude Fable 5 <[email protected]>
…ations

The disposition seal stops observation matching at a terminal commit,
but the terminal cleanup after it can still fail (prepared-row
rejection or the durable outbox update raising), retaining the
candidate for a full re-disposition. Re-register the hash inside
_retain_block_candidate_for_retry -- the funnel every retained path
crosses -- so acceptance evidence arriving during the retry backoff
registers again instead of vanishing behind the seal. The same-pass
exclusion between a sealed commit and its rejection is unchanged:
retention only happens after that pass has aborted.

Co-Authored-By: Claude Fable 5 <[email protected]>
@RobertClarke

Copy link
Copy Markdown
Member Author

@codex review

@RobertClarke

Copy link
Copy Markdown
Member Author

bugbot run

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 68aae45f6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 68aae45. Configure here.

@RobertClarke
RobertClarke merged commit cac749c into 1.x.x Jul 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant