Repository navigation
fix(router): preserve paused approvals until repair intent is durable - #863
Conversation
|
@clawsweeper automerge |
|
🦞✅ Approver: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 26, 2026, 12:54 AM ET / 04:54 UTC. ClawSweeper reviewWhat this changesThe PR keeps the human-review pause label until an automerge repair job is durably recorded and successfully dispatched, and extends end-to-end replay coverage for that interrupted handoff. Merge readinessThis is a focused, proof-backed fix for a real automerge-router durability failure. The supplied exact-head checks and containerized replay scenario support merging it through the already armed automerge path; no discrete patch defect is evident from the reviewed diff. Priority: P1 Review scores
Verification
How this fits togetherClawSweeper's comment router turns maintainer automerge approvals into either a direct merge or a durable repair job for branches that need rebase repair. Pause labels prevent unsafe repeated handling, while the shared state record and repair dispatch let a later replay safely continue the approval. flowchart LR
A[Maintainer approval] --> B[Comment router]
B --> C{Branch mergeable?}
C -->|Yes| D[Merge pull request]
C -->|Needs repair| E[Persist repair intent]
E --> F[Dispatch repair job]
D --> G[Clear review pause]
F --> G
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the focused ordering fix after the existing automerge gates confirm the exact head, retaining the durable-state-before-dispatch invariant for all repair-required approvals. Do we have a high-confidence way to reproduce the issue? Yes: the supplied production incident gives a concrete path—approve a behind PR, interrupt shared-state publication after planning repair, then replay the same approval. The exact-head E2E fixtures exercise that sequence for both minimal and OpenClaw-shaped repositories. Is this the best way to solve the issue? Yes: retaining the existing pause until the repair intent is durable prevents replay from losing its actionable marker without adding a new policy or configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ee5a86127079. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
@clawsweeper automerge |
|
@clawsweeper approve |
…openclaw#863) Summary: - Merged fix(router): preserve paused approvals until repair intent is durable after ClawSweeper review. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head f2a4cbb. - Required merge gates passed before the squash merge. Prepared head SHA: f2a4cbb Review: openclaw#863 (comment) Co-authored-by: Tak Hoffman <[email protected]> Approved-by: takhoffman
Summary
Root cause
A maintainer approval removed the pause label before attempting merge. When GitHub rejected the merge because the branch was behind, the router wrote an adopted repair job and waited for the shared state writer before dispatch. If that state publication timed out, the job was lost but the label removal remained. A replay then rejected the same approval because no active pause label remained.
Live instance: openclaw/openclaw#113663
The first exact approval run planned the repair and then failed in
Commit comment router ledger: https://github.com/openclaw/clawsweeper/actions/runs/30166399701A later replay found no actionable approval because the pause label had already been removed: https://github.com/openclaw/clawsweeper/actions/runs/30166403919
Validation
pnpm run build:repairnode --test test/repair/comment-router-core.test.ts— 125 passednode --test test/repair/comment-router-action-ledger.test.ts test/sweep-workflow.test.ts test/repair/automerge-e2e-workflow.test.ts— 80 passedpnpm checkpassed: https://github.com/openclaw/clawsweeper/actions/runs/30187967254/job/89755940313Linux production behavior proof
The exact-head production automerge workflow passed on an Ubuntu 24.04 runner:
https://github.com/openclaw/clawsweeper/actions/runs/30187967236/job/89755940224
Its real containerized router/workflow run reported the
approve-intent-persistencescenario as passed for both fixtures:tiny/approve-intent-persistenceopenclaw-shaped/approve-intent-persistenceThe scenario proves the interrupted handoff and replay ordering:
waitingwhile preserving the human-review pause label and issuing no repair dispatch;The workflow also uploaded artifact
automerge-e2e-30187967236-1(artifact ID8627648385) containing the run evidence.