Repository navigation
fix(pr-pipeline): read the lane sweep's whole 24-hour window - #9323
Conversation
The collect job made one run listing for the window, and GitHub returns at most 1,000 runs per filtered listing, so it saw about the last 4 hours. It now lists workflow by workflow: one per_page=1 call reads each count, and a range at the cap is halved until each part fits, inside the 350-call budget with 170 calls kept for the units. A workflow read only in part is named in a warning and its unit carries window_complete: false, which the judge prompt reports as partial. Refs: #9297 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
|
claude-security-review reviewed Security review of PR 9323 at 9058dd5: no security issues found. I read the full diff. It changes the lane sweep's collector, its test, the judge prompt, a convention doc and a changelog fragment.
critical-findings: 0 |
|
claude-review reviewed Code review: PR #9323 (lane sweep reads the whole 24-hour window)No findings. I posted no inline comments. What I checked
Minor, not worth blocking
|
Refs: #9297
Summary
The lane sweep's collect job made one run listing for its 24-hour window. GitHub's run listing returns at most 1,000 runs per filtered search, so the audit saw about the last 4 hours of the day (defect D1 of the GitHub API efficiency plan). It now reads every run of the window inside its 350-call budget, and a read it cannot finish is reported as partial instead of passing for a full day.
Automation Lanes owns this lane and agreed this session builds the change; Automation Lanes reviews the head.
Fix
listRunslists workflow by workflow (every workflow but the sweep's own, so slice A still sees every workflow's failures). Oneper_page=1call over the whole window reads each workflow's count; a workflow with no run costs that call alone, and a range whose count reaches the 1,000 cap is halved at a whole second until each part fits. Runs are kept by id, so a split never counts one twice.::warning::with what it read and its count, and its A or D unit carrieswindow_complete: falsebesidewindow_startand the newwindow_end. The judge prompt tells the model to call such counts partial, never a full day's. The lane sweep section ofdocs/conventions/pr-pipeline/README.mddescribes the listing.Verification
node --test .github/scripts/maintenance-audit-lane-runs/*.test.mjs: 46 of 46 pass, exit 0. New tests against a fake that caps each listing at 1,000 runs, as GitHub does:per_page=1count, an empty workflow costs one call, and the read stays under 350 − 170 calls;total: nullfor a workflow whose count was never read;mainwriteswindow_complete: falseon the part-read workflow's unit andtrueon the full one, and prints the warning.collect.test.mjs).bash scripts/check-affected.sh --tests: exit 0, 10 passed, 4 skipped (after rebasing ontomain, which had touched the same README).main.Related
🤖 Generated with Claude Code