Repository navigation
fix(queue): complete terminal acknowledgement as durable skip when the status comment is missing - #1004
Conversation
…e status comment is missing Terminal-finalization drivers looped forever every ~20 minutes for items whose command status comment was deleted (or never existed): the required status mutation threw, no receipt was recorded, and the driver requeued endlessly. In the terminal-acknowledgement context the missing comment now becomes a dedicated missing_status_comment outcome; the sweep workflow posts a terminal-finalization skip with that reason, the Durable Object accepts it under the same lease/attempt fencing, and the lifecycle projection records a distinct skipped_missing_comment acknowledgement state. Non-terminal --require-mutation callers keep the hard failure. Requires a Worker redeploy (Durable Object skip endpoint and lifecycle projection change).
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 11:42 AM ET / 15:42 UTC. ClawSweeper reviewWhat this changesThe branch makes a missing terminal command-status comment complete as a fenced Durable Object skip instead of endlessly requeueing the finalization driver. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain This PR remains necessary: current Priority: P1 Review scores
Verification
How this fits togetherClawSweeper’s terminal-finalization workflow updates a command-status comment and records the result through the exact-review queue Durable Object. The lifecycle projection then determines whether the queue driver completes, is retried, and how that terminal result appears in operational dashboard data. flowchart LR
A[Terminal finalization driver] --> B[Command status update]
B --> C{Status comment found?}
C -->|Yes| D[Observe acknowledgement]
C -->|No| E[Submit fenced durable skip]
D --> F[Lifecycle projection]
E --> F
F --> G[Complete or requeue driver]
F --> H[Operational dashboard]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Deploy the workflow, Durable Object, lifecycle projection, and validators together after attaching redacted live proof that a missing comment produces Do we have a high-confidence way to reproduce the issue? Yes from source: current main’s required-mutation missing-comment branch throws, while the only current durable-skip workflow condition is Is this the best way to solve the issue? Yes, with the deployment and proof conditions noted: a reasoned, lease-fenced terminal skip preserves strict required-mutation behavior for ordinary callers instead of weakening it globally. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e9f97b34fd59. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…e status comment is missing (openclaw#1004) Terminal-finalization drivers looped forever every ~20 minutes for items whose command status comment was deleted (or never existed): the required status mutation threw, no receipt was recorded, and the driver requeued endlessly. In the terminal-acknowledgement context the missing comment now becomes a dedicated missing_status_comment outcome; the sweep workflow posts a terminal-finalization skip with that reason, the Durable Object accepts it under the same lease/attempt fencing, and the lifecycle projection records a distinct skipped_missing_comment acknowledgement state. Non-terminal --require-mutation callers keep the hard failure. Requires a Worker redeploy (Durable Object skip endpoint and lifecycle projection change). Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Problem
Terminal-finalization runs loop forever for items whose command status comment no longer exists (live poison items: openclaw/openclaw#113663, #115277, #116248; sample run 30705586724). The "Update final command status once" step runs
repair:update-command-status --require-mutation --locked-conversation-terminal-skip --verify-terminal-status-receipt; with the status comment deleted, the script throwscommand status mutation required but no comment was found, the fenced acknowledgement never gets a receipt, "Requeue unobserved terminal acknowledgement" requeues the driver, and the item loops every ~20 minutes burning runners and painting runs red. There is nothing left to acknowledge, so the correct terminal state is a completed skip.Fix
Mirrors the existing
locked_conversationterminal-skip pattern end to end:src/repair/update-command-status.ts: in the terminal-acknowledgement context only (--require-mutation+--verify-terminal-status-receipt), a missing status comment becomes outcomemissing_status_comment→ warn,missing_status_comment=trueinGITHUB_OUTPUT, exit 0. Non-terminal callers keep the throw unchanged. The sibling no-address throw is left as is (the workflow's fenced-attempt step already exits nonzero before this point when both marker and comment id are missing)..github/workflows/sweep.yml: the "Complete locked terminal acknowledgement skip" step now also fires onmissing_status_comment == 'true', posts/internal/exact-review/terminal-finalization/skipwith the matching reason, and asserts the reason-specificacknowledgement_state(skipped_lockedvsskipped_missing_comment). The "Requeue unobserved terminal acknowledgement" guard treats a completed missing-comment skip as success, so the driver is deleted instead of requeued.dashboard/exact-review-queue.ts+dashboard/exact-review-lifecycle.ts: the skip endpoint accepts reasonmissing_status_comment(any other reason still 400s) with the same lease/attempt fencing, and the projection store records a distinct acknowledgement stateskipped_missing_comment(lifecycle state staysacknowledgement_skipped). Bay/worker snapshot validators accept the new state.Proof
dist/repair/update-command-status.jsagainst a fakeghreturning an empty comment list: red against the origin/main build (exits 1 with the exact production error), green after the fix (exit 0 +missing_status_comment=true). A sibling test proves the non-terminal--require-mutationthrow is unchanged./attempt+/skip(acknowledgement_state: "skipped_missing_comment", driver removed, later ack attempts denied) and asserts an unknown reason still returns 400.Deploy note
A Worker redeploy is required — this changes the Durable Object skip endpoint and lifecycle projection (
dashboard/). Until the Worker is redeployed, missing-comment skips will fail the jq assertion (the DO rejects the new reason with 400) and items keep requeueing as today; no worse than the status quo.