[codex] Make recovery updates atomic (BLO-18829) - #1242
Conversation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
🔗 Paperclip issue: BLO-18829 |
1 similar comment
|
🔗 Paperclip issue: BLO-18829 |
|
Closing as stale — this draft can no longer be landed as a diff. Measured against master
At that distance the surrounding code has moved out from under the patch, so "resolve the conflicts" would mean rewriting it against a codebase it was never written for — not merging it. Reopening is cheap if the branch is still wanted; the commits are untouched. Closing the PR does not close the underlying issue. Where this PR referenced a BLO issue, that issue remains the record of intent and the place to re-implement from, against current master. No judgement here on whether the original problem still exists — I did not verify that per-PR, and it should be re-checked before any re-implementation, since some of these may already have been fixed independently. |
Thinking Path
Linked Issues or Issue Description
Supersedes #820.
Refs #820 and BLO-18829.
This folds the narrow durable-wake marker lifecycle correction from #1101. That PR is based on #820 rather than
master, so it cannot serve as the required independently authored master-based successor.What Changed
updated_attoken for the recovery CAS and rolls back all related writes when it loses.Verification
Passed locally against current
master:pnpm --filter @paperclipai/server typecheckpnpm --filter @paperclipai/server exec vitest run --no-file-parallelism src/__tests__/issue-recovery-actions.test.tspnpm --filter @paperclipai/server exec vitest run --no-file-parallelism src/__tests__/issues-service.test.tspnpm --filter @paperclipai/server exec vitest run --no-file-parallelism src/__tests__/heartbeat-process-recovery.test.tsgit diff --check refs/remotes/https-origin/master...HEADThe heartbeat suite emitted the existing test-environment warning for an unavailable optional external adapter; it did not fail the suite.
Risks
Medium: this changes transaction boundaries in stranded-issue recovery. The main failure mode would be an incorrectly retained or removed wake marker; focused tests cover lost CAS rollback, retryable failed dispatch, and terminal cleanup. No migration or lockfile change is included.
Model Used
OpenAI Codex (GPT-5), using repository inspection, local code changes, GitHub API/CLI access, and focused test execution.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template