Repository navigation
fix(queue): preserve review budget for temporary deferrals - #1028
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 10:16 AM ET / 14:16 UTC. ClawSweeper reviewWhat this changesThe PR classifies coordination and GitHub-throttle deferrals so the exact-review queue preserves review-failure attempts while scheduling the requested retry. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked until stronger real behavior proof is added - 3 items remain Keep open for maintainer review: the branch addresses a source-reproducible queue-budget defect, but this member-authored draft still needs a proof-sufficiency decision for its queue/workflow boundary evidence. Priority: P2 Review scores
Verification
How this fits togetherThe exact-review queue accepts completion callbacks from the sweep workflow and decides whether an item is retried, parked, or completed. Its retry counters prevent persistent review failures from looping indefinitely while workflow coordination handles temporary delays. flowchart LR
A[Sweep workflow] --> B[Completion callback]
B --> C[Exact-review queue]
C --> D{Retry classification}
D -->|Temporary deferral| E[Keep review budget]
D -->|Regular failure| F[Spend retry attempt]
E --> G[Scheduled retry]
F --> G
Decision needed
Why: The repository policy requires controlled runtime proof for queue and workflow changes, and the submitted evidence explicitly excludes a deployed Worker and live throttle while the independently inspectable artifact is unavailable. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the explicit typed retry contract, then attach a current-head Docker-backed local-container trace that exercises the completion HTTP boundary and workflow payload handoff for coordination, throttling, ordinary failure, and source drift. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main increments regular review-failure attempts for every failed lease, while held coordination and throttled workflow paths provide only a deadline. The exact operational failure still needs boundary proof rather than another unit-only reproduction. Is this the best way to solve the issue? Yes, with proof pending: an explicit retry discriminator is safer than inferring a temporary deferral from a generic failure or deadline, provided both workflow producers use the same constrained contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3d4b45a19e50. LabelsLabel 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
History |
|
@clawsweeper re-review |
|
Maintainer proof decision: accept the current-head isolated-handler evidence for this bounded queue/workflow contract. The fresh AWS Crabbox run exercised the real |
What Problem This Solves
Fixes an issue where exact reviews delayed by an active same-head review or GitHub throttling consumed normal review failure attempts. Repeated temporary deferrals could therefore park valid review work as
review_retry_exhaustedwithout a content or model failure.Why This Change Was Made
The regular-review completion contract now accepts an explicit
retry_kindofcoordinationorthrottle, paired with a boundedretry_at. Same-revision typed deferrals retain their existing attempt counters and wait until the requested deadline; newer revisions discard the stale deadline. Untyped review failures keep the existing failure-budget behavior.The workflow propagates the typed reason only for known lease coordination and GitHub throttle paths. Publication completions and invalid type/outcome/deadline combinations are rejected. Systemic outage recovery, parked-item revival, lease expiry, and unrelated review noise remain out of scope.
User Impact
Temporary coordination and rate-limit delays no longer consume the eight-attempt review failure budget. Actual review failures still back off, spend attempts, and park at the existing limit.
OpenClaw Bay can display the new
coordination retryandthrottle retrybackoff reasons through its existing generic reason renderer. No Bay mutation or control surface changes are needed; Bay remains observer-only.Evidence
node --test --test-name-pattern='exact-review queue (defers coordination|defers throttle|spends|does not carry|rejects invalid retry|rejects regular-review retry)' test/dashboard-worker.test.ts- 6/6 passed.node --test test/sweep-workflow.test.ts- 113/113 passed.pnpm run checkpassed with the existing linked toolchain: active-surface, dashboard queue-boundary, limits, full format check, dashboard/test lint, and all three TypeScript builds.pnpm check, CodeQL, workflow analysis, JavaScript/TypeScript analysis, sparse repair smoke, and Windows Codex launcher all passed on0e3ad79a538767c92f85a4214391cff7d754f5ab.aws, runrun_238ea8cc8d52, leasecbx_f52b2ff84eca, image-backed machinec7a.8xlarge, exact head0e3ad79a538767c92f85a4214391cff7d754f5ab, artifact.artifacts/retry-deferral-crabbox-proof.md.git diff --check- passed.pnpm run checkitself could not start locally because this shared worktree's linkednode_moduleswas installed by a different pnpm state and pnpm attempted a destructive module purge. The same commands were run directly from the existing linked binaries instead.Real Behavior Proof
attemptsandreviewFailureAttemptsunchanged, persists the requested deadline/backoff reason, and returns{ ok: true, requeued: true }; an untyped failure still increments both counters.ExactReviewQueue/completeHTTP handler and durable queue transition, plus the event-review workflow payload builder.--fresh-pr openclaw/clawsweeper#1028checkout on direct AWS Crabbox, Node 24+,corepack pnpm install --frozen-lockfile, all three TypeScript builds, the six focused queue cases, and the complete 113-case workflow suite.coordination_retry/throttle_retry; the untyped failure incremented both counters; the newer revision reset counters and ignored the old deadline; invalid combinations returned HTTP 400.https://crabbox.openclaw.ai/portal/runs/run_238ea8cc8d52; proof artifact.artifacts/retry-deferral-crabbox-proof.md; test names and assertions are intest/dashboard-worker.test.ts; workflow propagation assertions are intest/sweep-workflow.test.ts.