[codex] fix(recovery): make review recovery dispatch durable - #1207
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
@ally please review exact head ba64d28. This independently authored successor supersedes #1048. It re-applies the intended recovery behavior from current master and addresses the two current-head Important findings: durable redelivery after a post-commit review-stage wake failure, and post-commit publication of the deferred escalation activity. Focused regressions, the 188-test recovery suite, and server typecheck pass. |
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: ba64d28
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- The review-stage escalation now commits its recovery action before dispatching the wake, preserving a repairable state across post-commit delivery failures.
- Stage and participant checks prevent an obsolete review run from overwriting a newer review stage.
- The deferred activity publication is correctly emitted only after the transaction commits.
Recommended Action
- Ready to merge once required checks complete.
allyblockcast
left a comment
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: ba64d28
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- The review-stage escalation now commits its recovery action before dispatching the wake, preserving a repairable state across post-commit delivery failures.
- Stage and participant checks prevent an obsolete review run from overwriting a newer review stage.
- The deferred activity publication is correctly emitted only after the transaction commits.
Recommended Action
- Ready to merge once required checks complete.
ba64d28 to
3150171
Compare
|
@ally please submit a fresh exact-head App review for @allyblockcast please separately inspect this same exact head and submit a formal User-seat approve or request-changes review for the singleton-team rule. This independently authored successor supersedes #1048. It was rebased onto current |
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 3150171
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- Review-stage escalation persists the recovery action within the locked transaction, then dispatches after commit so a failed delivery remains repairable.
- The wake backstop uses a persisted cooldown claim and delivery key to avoid duplicate recovery dispatches while retaining eventual redelivery.
- Deferred activity publication prevents rollback phantom events and is explicitly published after a successful escalation commit.
Recommended Action
- Ready to merge once required checks complete.
allyblockcast
left a comment
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 3150171
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- Review-stage escalation persists the recovery action within the locked transaction, then dispatches after commit so a failed delivery remains repairable.
- The wake backstop uses a persisted cooldown claim and delivery key to avoid duplicate recovery dispatches while retaining eventual redelivery.
- Deferred activity publication prevents rollback phantom events and is explicitly published after a successful escalation commit.
Recommended Action
- Ready to merge once required checks complete.
3150171 to
7907f7c
Compare
7907f7c to
a28af68
Compare
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: a28af68
Critical Issues (0)
Important Issues (1)
- [native-codex]
server/src/services/heartbeat.ts:24504—hasQueuedReplacementIssueWakeonly filters by company, queued status, andpayload.issueId; it does not require the queued wake to target the failed review participant or its active stage. A queued comment/monitor wake for another agent (or an earlier stage) therefore suppresses this failure's escalation, leaving the current review participant pending without a recovery action or a runnable replacement.- Restrict the guard to a wake/run for the same participant and stage, or prove that the queued wake is an executable replacement for the current review stage.
Suggestions (0)
Strengths
- The review-stage state mutation and recovery action now commit before the independent wake dispatch.
- The new backstop gives failed post-commit delivery a durable retry path.
Recommended Action
- Address the Important recovery-suppression bug before merge.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
a28af68 to
0d95183
Compare
|
@ally please submit a fresh exact-head App review for @allyblockcast please separately inspect this exact head and submit a formal User-seat approve or request-changes review. The head is rebased onto current |
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 0d95183
Prior Findings Dispositioned (1)
- prior:a28af68 important 1 — fixed —
server/src/services/heartbeat.ts:24324— queued replacement wakes now require the active participant,execution_review_participant_recoveryreason, issue ID, and active stage ID, so unrelated queued wakes cannot suppress this stage's recovery.
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- The review-stage recovery action and state transition commit before the independent wake delivery, leaving failed delivery repairable by the new action-driven backstop.
- The backstop uses an atomic cooldown claim and delivery-specific idempotency key, preventing concurrent sweeps from duplicating redelivery.
- Tests cover stage supersession, mismatched queued wakes, post-commit dispatch failure, and the committed activity event.
Recommended Action
- Ready to merge once required checks complete.
allyblockcast
left a comment
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 0d95183
Prior Findings Dispositioned (1)
- prior:a28af68 important 1 — fixed —
server/src/services/heartbeat.ts:24324— queued replacement wakes now require the active participant,execution_review_participant_recoveryreason, issue ID, and active stage ID, so unrelated queued wakes cannot suppress this stage's recovery.
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- The review-stage recovery action and state transition commit before the independent wake delivery, leaving failed delivery repairable by the new action-driven backstop.
- The backstop uses an atomic cooldown claim and delivery-specific idempotency key, preventing concurrent sweeps from duplicating redelivery.
- Tests cover stage supersession, mismatched queued wakes, post-commit dispatch failure, and the committed activity event.
Recommended Action
- Ready to merge once required checks complete.
Thinking Path
Linked Issues or Issue Description
What Changed
Verification
Risks
Model Used
Checklist