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
fix(pr-pipeline): merge-group verify reader floors reads at github-token's 1,000-call cap and ejects queue entries #17428
ci-status's merge-group verdict reader (babysit_gh.py_below, run from the lanes-hold step of .github/workflows/pr-require-checks.yml) plans its read floor against github-token's 1,000-call planning cap (limit-cap in .github/actions/log-api-budget/rate-limits.json), not the GITHUB_TOKEN pool's live 5,000 x-ratelimit-limit. It counts remaining against the cap as header remaining minus 4,000, so it refuses with verify:unreadable whenever the header shows fewer than about 4,100 requests left. In practice every lane pull request is ejected from the merge queue unless its merge-group run reads within minutes of the hourly reset.
Evidence:
Run 44463304120 stopped with 2,766 of 5,000 requests left; 21 merge-queue runs were ejected and lane work stopped for about 2 hours (as put to the owner in Q227).
Merge-group run 44478992544: "-3036 of the planned 1000; header remaining 964 of 5000".
Merge-group run 44482863117: "-150 of the planned 1000; header remaining 3850 of 5000".
Merge-group run 44491264808: "-232 of the planned 1000; header remaining 3768 of 5000".
Change
The merge-group verdict reader sets its read floor from the live header limit: read-floor (10%) of 5,000, so 500, with the limit-cap clamp dropped for that reader only, behind BABYSIT_READ_FLOOR_HEADER_LIMIT=1.
Its cold-read gate reserves read-floor x header limit (500).
The owner-PR reader, pr-merge's readers and the shell guard (API_BUDGET_LIMIT_CAP) keep limit-cap.
Done when
With the flag set, the merge-group reader sends a read at 2,766/5,000 and at 500/5,000, and floors it at 499/5,000.
Without the flag, every reader's floor is unchanged.
Only the merge-group block of the lanes-hold step exports the flag.
Tests cover both readings, with and without the flag.
Owner decision
This loosens a rate guard: it drops github-token's limit-cap read-floor clamp for the merge-group verify reader, so at a 5,000 header limit that reader's floor falls from about 4,100 requests left to 500. The owner decided it as D418 (Q227, option (a): have that reader plan to the live 5,000 limit and keep its 10% floor).
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: babysit_gh.py _below, the lanes-hold step of pr-require-checks.yml, and the rate-guard tests; read by the merge-group verdict reader and the lanes that depend on the merge queue.
Reversible: yes; revert the change, or leave BABYSIT_READ_FLOOR_HEADER_LIMIT unset to restore the current floors.
Open questions: none
I understand the merge-group verdict reader plans its read floor against github-token's 1,000-call limit-cap instead of the live 5,000 header limit. It therefore returns verify:unreadable below about 4,100 remaining requests and ejects lane pull requests from the merge queue. The requested change is narrow. Behind BABYSIT_READ_FLOOR_HEADER_LIMIT=1, only that reader would use the live limit, with a floor of 500. The cold-read gate would reserve 500. Every other reader and the shell guard would keep limit-cap. The done-when items are exact, and the intended outcome is stated. The owner decision cited in the body (D418) is a claim in the issue text, so I did not rely on it. I found no duplicate. Related open issues: #17377 (same verdict-reader surface), #16642 (token rate-limit floor) and #14293 (merge queue ejections).
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: With BABYSIT_READ_FLOOR_HEADER_LIMIT=1 exported only in the merge-group block of the lanes-hold step, the verdict reader plans its read floor and cold-read gate against the live header limit (500 of 5,000) instead of limit-cap's 1,000.
Acceptance criteria
babysit_gh.py _below (plugins/source-control/skills/babysit-prs/scripts/babysit_gh.py:1064) skips the limit-cap clamp for field read-floor only when env BABYSIT_READ_FLOOR_HEADER_LIMIT is 1; the env name is a named constant next to READ_FLOOR_STOP_ENV (line 589).
With the flag set and github-token limit 5000, low_headroom is false at remaining 2766 and at 500, and true at 499.
Without the flag, low_headroom for github-token gives the same results as today (limit-cap 1000 clamp; e.g. header remaining 3850 of 5000 is below the floor), and writes_paused is unchanged either way.
Other pools (lanes-app, graphql, owner-token) and the unflagged readers behave the same with and without the flag.
In .github/workflows/pr-require-checks.yml, the merge-group verdict reader invocation (around line 6869) runs with BABYSIT_READ_FLOOR_HEADER_LIMIT=1, and the owner-PR reader invocation (around line 6723) does not export it.
The cold-read gate awk (around line 6857) reserves floor x header limit (500 at limit 5000) rather than floor x min(limit, API_BUDGET_LIMIT_CAP), and the explanatory comment (lines 6810-6812) is updated to match.
The job-level API_BUDGET_LIMIT_CAP: "1000" (line 4195) and pr-merge's readers keep limit-cap.
Tests in tests/test_babysit_gh_rate_guard.py cover both readings, with and without the flag, at 2766/5000, 500/5000 and 499/5000.
A workflow test or grep check asserts that only the merge-group block of the lanes-hold step exports the flag.
The existing babysit and log-api-budget test suites pass.
plugins/source-control/skills/babysit-prs/scripts/babysit_gh.py:1064: _below clamps remaining and limit to limit-cap for read-floor when cap < limit, which is the behavior to gate
plugins/source-control/skills/babysit-prs/scripts/babysit_gh.py:586: READ_FLOOR_STOP_ENV is the existing env switch for per-read floor stop
plugins/source-control/skills/babysit-prs/scripts/babysit_gh.py:1082: low_headroom docstring describes the limit-cap planning
.github/workflows/pr-require-checks.yml:6857: cold-read gate computes floor x min(limit, API_BUDGET_LIMIT_CAP)
.github/workflows/pr-require-checks.yml:6869: merge-group reader runs with BABYSIT_READ_FLOOR_STOP=1
.github/workflows/pr-require-checks.yml:6723: the other reader invocation, which must keep limit-cap
.github/workflows/pr-require-checks.yml:4195: job env API_BUDGET_LIMIT_CAP is 1000
Activity
github-actions commentedon Nov 19, 2026
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: babysit_gh.py
_below, the lanes-hold step of pr-require-checks.yml, and the rate-guard tests; read by the merge-group verdict reader and the lanes that depend on the merge queue.Reversible: yes; revert the change, or leave BABYSIT_READ_FLOOR_HEADER_LIMIT unset to restore the current floors.
Open questions: none
I understand the merge-group verdict reader plans its read floor against github-token's 1,000-call
limit-capinstead of the live 5,000 header limit. It therefore returnsverify:unreadablebelow about 4,100 remaining requests and ejects lane pull requests from the merge queue. The requested change is narrow. BehindBABYSIT_READ_FLOOR_HEADER_LIMIT=1, only that reader would use the live limit, with a floor of 500. The cold-read gate would reserve 500. Every other reader and the shell guard would keeplimit-cap. The done-when items are exact, and the intended outcome is stated. The owner decision cited in the body (D418) is a claim in the issue text, so I did not rely on it. I found no duplicate. Related open issues: #17377 (same verdict-reader surface), #16642 (token rate-limit floor) and #14293 (merge queue ejections).Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 19, 2026
Not admitted to the issue lane yet: open pull request #17401 is for it.
melodic-automation-lanes commentedon Nov 19, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: With BABYSIT_READ_FLOOR_HEADER_LIMIT=1 exported only in the merge-group block of the lanes-hold step, the verdict reader plans its read floor and cold-read gate against the live header limit (500 of 5,000) instead of limit-cap's 1,000.
Acceptance criteria
_below(plugins/source-control/skills/babysit-prs/scripts/babysit_gh.py:1064) skips the limit-cap clamp for field read-floor only when env BABYSIT_READ_FLOOR_HEADER_LIMIT is 1; the env name is a named constant next to READ_FLOOR_STOP_ENV (line 589).External state: none
Related work
Sources read
_belowclamps remaining and limit to limit-cap for read-floor when cap < limit, which is the behavior to gateAutomated refinement by the lanes App. Intake triages the issue again with it.