Repository navigation
fix(review): answer a maintainer request whose retry is skipped at admission - #2001
Conversation
…mission On a maintainer-authored item, a review generation that still carries an explicit command but lacks request authority (for example a fail-closed source-drift requeue whose verification the queue stripped) is skipped at claim admission. The skip path never created the job's write token, so "Mark unsuccessful re-review" never ran and the command status stayed "Review in progress" forever, as on #1969. Create the write token for exactly that case (semantic no-op, maintainer hold, command context); every other token consumer is gated on the review proceeding or on non-command items. "Mark unsuccessful re-review" then answers "Waiting" with a request to re-review. Waiting is deliberately not terminal, so a later continuation of the same request still runs.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@clawsweeper review Follow-up to #1981/#1984/#1989 for head 5eb2493: answers a maintainer request's status when its retry is skipped at admission. The PR body carries the token-consumer audit, the end-to-end proof (real step script and status CLI behind the queue fences), and validation. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR changes a skipped maintainer-request retry from a stuck review status to Waiting with instructions to request a fresh review. Example: A request on item 1969 retains command context but loses explicit-request verification before retry admission.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a concrete unanswered-request path still present on main. The added ownership-loss traces resolve the prior review concern, and no introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe exact-review workflow consumes claimed queue decisions, checks live admission policy, and updates command status through the existing queue-fenced GitHub writer. flowchart TD
A[Claimed review decision] --> B[Live admission]
B --> C[Maintainer request hold]
C --> D[Scoped token exception]
D --> E[Queue ownership fences]
E --> F[Existing status CLI]
F --> G[Waiting command status]
Technical reviewBest possible solution: Retain the narrow admission exception and reuse the existing fenced writer to answer skipped requests without granting review authority. Do we have a high-confidence way to reproduce the issue? Main's admission and token gates establish the skipped-command path directly; the supplied controlled trace demonstrates the corrected status, and no target code was executed during this review. Is this the best way to solve the issue? The workflow owns the missing token admission, and reusing its existing unsuccessful-command writer fixes that boundary without weakening maintainer review authorization or adding another status owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dcd06a4cbee3. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 14, 2026, 1:31 PM ET / 17:31 UTC (Revision 2). |
|
@clawsweeper re-review Added the requested allowed and nearest-forbidden final-effect traces for head 5eb2493 in the PR body: superseded step fence, owner lost before and during comment lookup, and queue error all make zero status PATCHes; only a current owner writes Waiting. |
|
🦞👀 Re-review progress:
|
Follow-up to #1981, #1984, and #1989.
What Problem This Solves
Fixes: a maintainer's explicit
@clawsweeper re-reviewstatus stays at "Review in progress" forever when a retry of that request is skipped at claim admission.On a maintainer-authored item, a review generation that still carries the command's status but no longer carries request authority is skipped by the maintainer opt-in gate. For example, #1981/#1984's fail-closed
source_drift_requeuehas its verification stripped, because it could not prove it continues the request. This is the same failure seen on #1969 (rev 3, https://github.com/openclaw/clawsweeper/actions/runs/38431867802).The skip path never creates the review job's target write token. "Mark unsuccessful re-review", the step that answers a command whose review did not complete, therefore never runs.
Nothing else answers the status either. A probe on the real queue shows that a review generation completed with
lifecycle_terminal_disposition: policy_nooprecordsacknowledgement: pendingand creates no terminal-finalization driver; those drivers exist only for publication completions. It also came up on #1989 (Codex connector P2, #1989 (comment)).User Impact
When ClawSweeper skips such a retry, the maintainer's status comment now says Waiting, with the reason and a prompt to request a fresh review, instead of claiming forever that a review is running.
Nothing changes for automatic items, non-maintainer items, or reviews that run.
Why This Change Was Made
scheduled_semantic_noop == 'true',review_hold == 'maintainer_request_required', andhas_command_context == 'true'. I audited every step that consumes the token. Each is gated on the review proceeding (live-item.outputs.proceed), on the review having run, or on items without command context (has_command_context != 'true'). So the only newly enabled step is "Mark unsuccessful re-review".ADMISSION_REVIEW_HOLD; the completion step'sREVIEW_HOLDstays the only one) and, for this hold, answers Waiting. Waiting is deliberately non-terminal.--refuse-terminal-statewould otherwise make a later legitimate continuation of the same request, such as fix(queue): answer requests whose deferred requeue meets a queued review #1989's handoff, refuse to review. Other answers are unchanged.--require-queue-authority-fence.ClawSweeper's own review comments already contain "comment
@clawsweeper re-review" without triggering commands, so the hint in the status text is inert.Documentation Impact
docs/scheduler.md(active; owns the maintainer request contract): a skipped request-carrying retry answers "Waiting" with a re-review request.changelog.d/answer-skipped-maintainer-request.md.Evidence
test/sweep-workflow.test.ts"a maintainer admission skip that carries a command answers its status":--state Waitingwith both fences; no hold still givesFailed.REVIEW_HOLD" still holds.pnpm run check:fastpasses, and the 8 affected test files (sweep workflow, structural invariants, terminal-finalization cancellation, review recovery/placeholder, command ledger, admission e2e, review hold) pass 174/174.Real Behavior Proof
Mark unsuccessful re-reviewstep script fromsweep.yml, executed by bash from the repository root;scripts/control-plane-curl.shanddist/repair/exact-review-queue-request.js heartbeat;pnpm run repair:update-command-statusCLI (dist/repair/update-command-status.js).gh, throughGH_BIN, serving a status comment shaped like fix(review): retry Codex model-capacity failures as provider throttling #1969's stuck one (State: Review in progress) and capturing the PATCH;ADMISSION_REVIEW_HOLDmaintainer_request_requiredState: Waiting, "ClawSweeper did not review this retry: maintainer reviews need an explicit request, and this retry could not show that it continues one. Comment @clawsweeper re-review to request a fresh review."State: Failed, unchanged text/internal/exact-review/heartbeat: the step's lease fence and the CLI's authority fence, for both cases. Exactly one status PATCH per case.Allowed and nearest-forbidden owners on the newly enabled path. This run is on the current head
5eb24930withADMISSION_REVIEW_HOLD=maintainer_request_required. The local queue answers each heartbeat in sequence from a per-scenario plan, and the recordingghcounts comment reads and writes. In the allowed case three heartbeats fire: the step's lease fence, then the status CLI's authority fence before it looks up the comment, then again before it writes.ghGET / PATCHlease_supersededSo the newly enabled path writes only while the queue confirms the claim at every fence, and an expired or reassigned owner causes zero comment writes.
mainthe token gate is false for this case, so the step never runs and the status stays "Review in progress". The test evaluates the gate for that case.pending, because the workflow answers the status, not a finalization driver. That matches how the review job already answers its own failures.Review Findings
5eb24930, "Verify the newly enabled write path rejects stale ownership": addressed with proof, no code change. The allowed and nearest-forbidden table above covers a superseded step fence, an owner lost before and during comment lookup, and a queue error. Each forbidden case makes zero PATCHes, and the during-lookup case reads the comment but does not write it.OpenClaw Bay
Not affected. There is no queue, lifecycle, telemetry, status, or projection schema change: a workflow step gate and one status text. Bay stays observer-only.