Repository navigation
ci: sweeper — collect-then-cancel + phantom (zero-job) run class (#2605) - #9998
Conversation
Codex Review Summary: ❌ FailedThis 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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Follow-up to #9993 (task 16678), from the inaugural sweep's live findings:
Collect-then-cancel. The first version cancelled while paginating the queued-runs list; each cancellation shrinks the list and skips entries (the inaugural laptop run of the same logic cancelled 2 of 90 candidates for this reason). The sweeper now collects all candidates across all pages first, then cancels.
Phantom run class. Most of the stale population (the 2026-11-11 saturation runs) has zero jobs materialized and the cancel endpoint refuses them:
409 Cannot cancel a workflow run that has not been queued yet(verified live on runs 43098034286, 43097944814, 43097086285 — alljobs.total_count == 0). They hold no runner and only GitHub-side expiry clears them. The sweeper now detects the zero-job class, logs those runs as phantom in the job summary instead of attempting (and failing) cancels, and reports the phantom count separately — so queue depth stops being misread as runner demand.Verified selection logic live this shift (dry-run): 246 queued total, 90 stale >6h, all 90 superseded, 0 still-head; the cancellable subset was cancelled in the inaugural sweep (log on #2605).
Task 16678, lane code-d.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.