fix(scheduler): prioritize canonical coverage gaps - #960
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 30, 2026, 9:33 AM ET / 13:33 UTC. ClawSweeper reviewWhat this changesThe PR makes scheduled review planning use canonical Worker tuple identities rather than legacy report files when prioritizing open coverage gaps. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep this PR open: the canonical-identity design is a focused follow-up to the merged scheduler work, but the branch still needs after-fix real workflow evidence and should not include a release-owned changelog edit. Likely related people: steipete is the recent scheduler contributor behind the two merged prerequisite changes (medium confidence). Priority: P2 Review scores
Verification
How this fits togetherThe scheduler hydrates durable Worker review records, selects due GitHub issues and pull requests, and sends the chosen candidates into the exact-review queue. This change aligns fanout and per-repository selection with the coverage endpoint’s canonical identity boundary so legacy report context does not suppress first canonical reviews. flowchart LR
A[Worker canonical item tuples] --> B[Hydrated records manifest]
C[Legacy backfill reports] --> D[Planner review context]
B --> E[Coverage-tracked classification]
D --> E
F[Live open GitHub items] --> E
E --> G[Priority candidate selection]
G --> H[Exact-review queue]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Remove the release-owned changelog line and add redacted after-fix workflow evidence showing a hydrated canonical manifest, coverage-untracked selection ahead of canonical refreshes, and queue admission for the selected candidates. Do we have a high-confidence way to reproduce the issue? Unclear for a live current-head reproduction: the supplied production observations establish the pre-fix mismatch, and the proposed source/test scenario is reproducible, but no after-fix workflow run was provided. Is this the best way to solve the issue? Yes in design: carrying exact canonical identities through hydration, fanout, and planning is narrower and less ambiguous than inferring coverage from legacy report files. The real workflow handoff still needs proof before this is the merge-ready solution. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fd8f2acf8a31. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What 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
|
What Problem This Solves
The scheduler was using two different meanings of “tracked.” The live coverage endpoint counts only modern canonical Worker tuples, while planner hydration contains both those tuples and older imported backfill reports. PR #956 prioritized only items with no hydrated report at all, so a legacy backfill report incorrectly yielded to canonical re-reviews even though
/api/review-coveragestill counted that item asuntracked_open.This is why completed reviews barely moved coverage: the ordering fix ran, but against the wrong identity boundary.
Production Evidence
Recent planner run 30542575714, on the #958 merge commit, hydrated canonical Worker state at revision 90804 and scanned 5,122 due
openclaw/openclawcandidates. Its 51 selected candidates contained:lastReviewedAt, including records reviewed in JuneAt the same time,
GET /api/review-coveragereported 2,651untracked_openforopenclaw/openclawand 2,749 fleet-wide. The planner therefore collapsed almost the entire operational coverage gap into the tracked cohort beforeselectDueCandidatesordered it.The queue was not the blocker. Its live review lane had 122 free slots and the normal-backfill token bucket held its full 78-token burst. No guaranteed-claim floor can help candidates that never reach enqueue with the right priority.
Fix
itemslisting and persist the exact canonical item identities in the worker-records manifest.coverageTrackedin plan telemetry, and keep every coverage-untracked candidate ahead of canonical refreshes.No Cloudflare Worker redeploy or storage migration is required: the authenticated canonical record-list endpoint is already deployed. The workflow/planner change has no production effect until this PR reaches
main.Proof
pnpm run format:checkandpnpm run lint: passed.pnpm run check: static checks, all builds, lint, changed-surface coverage, and coverage thresholds passed; the full suite passed 2,797 tests, skipped 9, and failed only the five untouched macOS containment fixtures that import Linuxlibc.capset.~/.claude/skills/autoreview/scripts/autoreview --mode local: clean, no accepted/actionable findings, correctness 0.98.~/.claude/skills/autoreview/scripts/autoreview --mode branch --base origin/main: clean, no accepted/actionable findings, correctness 0.93.Expected Burn
The observed pre-fix movement was 5 items in 25 minutes, about 12 untracked items/hour. After this fix, the 390/hour normal-backfill lane becomes the admission ceiling. With 10-minute fanout, smaller-repository fairness reservations, and
openclaw/openclawholding about 96% of the current fleet gap, the expected steady review burn for that repository is roughly 300–325 canonical-untracked items/hour, with the banked burst improving the first cycle.The public counter moves only after durable publication. The live publication lane was publishing about 208 items/hour, so dashboard-visible burn should initially be about 200/hour until that lane catches up, then approach the roughly 300/hour review rate if publication capacity is no longer the limiter.