Repository navigation
fix: harden scaled review scheduling - #943
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 29, 2026, 1:19 PM ET / 17:19 UTC. ClawSweeper reviewWhat this changesThis PR retries expected exact-review lease races, treats superseded queue work as a fenced no-op, classifies surviving provider throttles, publishes signed live GitHub inventory for coverage, and refreshes overdue canonical records ahead of unseen backlog. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 6 items remain Keep this PR open. The queue-contention and coverage fixes are a coherent follow-up to the merged scaled-scheduling rollout, but the branch changes a release-owned changelog and has only test/static results rather than inspectable after-fix Worker and workflow behavior proof. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper selects open GitHub items for review, reserves an exact-review lease, runs Codex, and publishes canonical review records. The Worker-backed dashboard then combines those records with fleet inventory to show recent-review coverage and backlog cohorts. flowchart LR
A[GitHub open items] --> B[Target fanout scan]
B --> C[Exact-review queue]
C --> D[Lease reservation]
D --> E[Codex review workflow]
E --> F[Canonical review records]
B --> G[Signed live inventory]
F --> H[Coverage dashboard]
G --> H
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Remove the CHANGELOG.md entry, retain the release context in the PR body, and attach redacted after-fix evidence showing a signed inventory publish plus a queue-authority-race or coverage response outcome before merging. Do we have a high-confidence way to reproduce the issue? No high-confidence current-main reproduction was supplied in a repeatable form. The PR body identifies concrete failed workflow signatures and the changed paths support the diagnosis, but the after-fix behavior has not been demonstrated in a real Worker/workflow setup. Is this the best way to solve the issue? Unclear. The proposed queue and inventory direction is consistent with the reported scheduling and coverage failure modes, but removing the release-owned changelog edit and proving the integrated rollout are necessary before it is the best merge path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7b3e54c3cee0. 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
|
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Summary
provider_throttleclassification when capacity errors survive themFailure classification
The scale tail is queue contention, not a model ceiling.
Reserve exact review leasewithexact-review queue authority changed ... retry required. Eleven of 16 sampled failed exact-review runs had this shape.Exact-review heartbeat lost its lease tuple; the resulting exit 143 was mislabeled as unsuccessful generation.setup-codexconfigures an isolated CLI and local Responses proxy but has no 128-call or provider-concurrency cap. The repository's 128 value is ClawSweeper worker admission. Existing review execution already performs bounded transient transport retries; this change makes surviving provider throttles observable without reducing throughput for a ceiling the evidence does not show.Coverage root cause
At 2026-07-29 16:58 UTC the public endpoint reported 1,754
open_records, 1,317 recent reviews, and the unchanged 426 pending records. Live GitHub held 3,596 open issues plus 2,319 open pull requests: 5,915 open items.reviewCoverageSynctreated canonicalitemsrecords as the entire open universe, but those records exist only after an item has reached publication. Itspendingfallback also combined oldreview_status: completerecords outside the seven-day window with records missing usable review metadata. Meanwhile the scheduler correctly selected older never-reviewed GitHub items, creating fresh canonical records outside the old denominator while the 426 tracked records remained behind that unseen backlog. The dashboard therefore showed rising verdict throughput with a flat pending cohort.The fix reuses the existing authenticated six-hour fleet scan to publish live per-repository issue/PR totals to the Worker. Coverage now uses live reviewable open items as the denominator, exposes tracked/untracked and expired/unreviewed breakdowns, excludes protected canonical records, and reports canonical records from repositories no longer in the eligible fleet as unmanaged instead of degrading active-fleet coverage. The scheduler gives already-tracked six-day-overdue records first claim on coverage slots, then fills all remaining capacity from unseen items.
Proof
pnpm run format:check: passedpnpm run lint: passedpnpm run build:all: passed on Node 26.5.0pnpm run check: static/build/lint gates and coverage thresholds passed; the full suite retains the five known macOS-only Linux-containment failures because Apple libc does not exportcapset, matching the documented feat: raise scheduled review throughput #940 baseline/Users/steipete/.claude/skills/autoreview/scripts/autoreview --mode local: clean, no accepted/actionable findingsgit diff --check: passedRollout
A Worker redeploy is required for the signed inventory endpoint and corrected coverage response. After deploy, the next
37 */6 * * *fleet coverage scan seeds the live inventory; until then the API explicitly reportsinventory_status: missingand retains the canonical-record fallback. This PR does not deploy, merge, or run the live apply/close path.