You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: split busy hours in the runner demand report instead of failing - #34324
The daily CI runner demand report failed for the first time today (run):
Error: Hourly run inventory exceeds API limit; split the interval
PR volume now goes past 1000 workflow runs in some hours (12,132 runs on 2026-10-26). The runs API serves at most 1000 results per query, so hourly windows no longer fit.
This change keeps the 24 hourly windows. Any window with total_count > 1000 is halved recursively until each half fits. Ranges stay inclusive at second granularity, with no overlap and no gaps.
Verification
I ran the patched script locally against the live API for the window that failed (CI_METRICS_END=2026-10-27T04:00:00Z):
Collected 12,132 runs, all unique run ids.
Sampled 501 runs and produced the full markdown report.
pnpm test config/scripts/ci-runner-metrics.test.mjs passes.
After merge, I'll dispatch the workflow once to confirm it on CI.
The runs API serves at most 1000 results per query. On 2026-10-27 one hour
crossed that and the daily report threw. Halve any oversized interval until
each query fits.
The runner demand script now uses collectRuns for each hourly interval. The helper paginates queries with no more than 1,000 runs. When a query exceeds that limit, it divides the interval and combines results. It throws an error when an over-limit interval is shorter than two seconds.
Priority: Normal
Merge Risk: Low · up to 30dde
The report’s new oversized-window behavior lacks a test that would catch dropped runs. Add that targeted test before merging, or accept the bounded coverage gap.
Pre-merge checks: 3 · 2
Failed checks: 2 warnings
Check name
Status
Explanation
Resolution
Description check
The description explains the failure, the recursive interval-splitting change, and verification results. It does not follow the required template because it omits ELI5, Why, Linked Issue, Visual Proof…
Add the required template sections. Include an actual linked issue, or explain the applicable maintainer exception. Add a Visual Proof section with N/A and a reason if there is no UI change. Complete Testing, AI Disclosure when applicable, …
Docstring Coverage
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title clearly summarizes the main change: splitting busy hourly windows in the runner demand report instead of failing.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description explains the failure, the recursive interval-splitting change, and verification results. It does not follow the required template because it omits ELI5, Why, Linked Issue, Visual Proof or N/A, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections.
Resolution
Add the required template sections. Include an actual linked issue, or explain the applicable maintainer exception. Add a Visual Proof section with N/A and a reason if there is no UI change. Complete Testing, AI Disclosure when applicable, Review, Agent skill upstream boundary, Notes, and Checklist items. Rename or map the existing What and Verification content to the corresponding template sections.
Full details: Docstring Coverage
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
collectRunnerDemand returns runs, and the existing run fixture is in scope. The suggested test can pass against the current implementation. Add it to ensure both recursive halves reach the returned inventory.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 394ddc5a-20d6-4e51-9c5a-05e014e15ca6
Commits
Reviewing files that changed from the base of the PR and between 755bbfa and 30dde6e.
Files selected for processing: 1
config/scripts/ci-runner-demand.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The daily CI runner demand report failed for the first time today (run):
PR volume now goes past 1000 workflow runs in some hours (12,132 runs on 2026-10-26). The runs API serves at most 1000 results per query, so hourly windows no longer fit.
This change keeps the 24 hourly windows. Any window with
total_count > 1000is halved recursively until each half fits. Ranges stay inclusive at second granularity, with no overlap and no gaps.Verification
I ran the patched script locally against the live API for the window that failed (
CI_METRICS_END=2026-10-27T04:00:00Z):pnpm test config/scripts/ci-runner-metrics.test.mjspasses.After merge, I'll dispatch the workflow once to confirm it on CI.