Repository navigation
fix(source-control): keep the read floor per read and drop the cold-read listing in index mode - #13085
Conversation
…x mode ci-status priced a cold verdict read from one unfiltered artifact listing, read every page, and held the merge queue entry when that listing did not read. That listing has returned HTTP 500 and truncated JSON since 2026-11-04 03:12Z, so every entry on a cold run cache would hold. In FAIL index mode the reader reads by exact name, the same reads a warm cache makes with no pre-check, so the gate and its listing read run only outside index mode now. The index-mode predicate is read once for both uses. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…status Skipping the cold-read estimate in index mode left nothing keeping the reader's reads above GITHUB_TOKEN's read floor: babysit_gh's floor only skips report-only reads. With BABYSIT_VERIFY_FLOOR_STOP=1, which ci-status now sets, the reader sends no read once a pool it read is below its read-floor share, and the judgment fails closed. This covers the warm path and the whole-listing fallback too, and needs no estimate. 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c1ed093d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review: PR #13085, no security issues foundI read every hunk of all 4 changed files. Two of them are trusted paths and merge-hold controls: the ci-status hold step in What changed since the last round
Merge-hold check: no hold is weakened
Trust controls: no change to the trusted-actor list, the trusted-trigger check, token scope, Instruction surfaces: none changed. Spend: none new. The change only cuts GITHUB_TOKEN reads: index mode skips the unfiltered listing, and reads stop at the floor. critical-findings: 0 |
|
claude-review reviewed Code review: #13085 (keep the read floor per read and drop the cold-read listing in index mode)I read every hunk of all 4 changed files:
To check what the new stop covers, I also traced Code: no blocking findingsThe floor check now sits in
My earlier finding about the stop living only in One known limit, not a finding: Advisory: the PR description no longer matches the changeIt describes the first round's design, which the diff no longer contains:
If the body becomes the squash commit message, it will send readers to an env var that doesn't exist and a guard location that isn't there. Fix: update the Fix and Verification sections to match the head. Other checks
Spend (not a finding): this spends GitHub API rate-limit budget only. If anything it spends less in index mode, because the unfiltered listing read is dropped there. There is no billing impact. |
The floor stop guarded only Reader._api_object, so the reader's other reads (the whole listing past INDEX_NAMES_CAP, per-FAIL run reads, compares, downloads, commits, GraphQL) still went through postmerge.gh_capture with no check. The stop now sits in babysit_gh._send, which sends every gh call and page: with BABYSIT_READ_FLOOR_STOP=1 a read whose pool is below its read-floor share raises ReadsFloored, a RuntimeError the reader turns into an unreadable read, so the judgment fails closed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: hub ledger L245; the unfiltered artifact listing returns HTTP 500 / truncated JSON since 2026-11-04 03:12Z and holds every cold merge-queue entry at ci-status.
Summary
On a merge_group run with no carried run cache, ci-status priced a cold verdict read from one unfiltered
actions/artifactslisting, read every page, and exited 1 ("the artifact listing could not be read ... Re-queue it") when that listing failed. The listing has failed since 03:12Z: Lane 5 saw HTTP 500 on 3 of 3 tries; the hub's probe ofactions/artifacts?per_page=1at ~04:36Z returned "unexpected end of JSON input", while name-filtered reads return 200.In FAIL index mode (
verify-legacy-fails.jsonpresent) the reader reads verdicts by exact name (babysit_verify_evidence.pyevidencecallsreader.targeted(...)), so the listing-based estimate prices a reader that no longer runs. No fixed cost bounds the index-mode reader either:_namedpages every artifact of a name, and each FAIL found adds reads. So the read floor is now kept per read, atbabysit_gh's call seam, rather than by an estimate. Before this, nothing kept it for the reader:babysit_gh's read floor (low_headroom) only skipped report-only reads.Fix
babysit_gh.py_send, the one place every gh call and page is sent: withBABYSIT_READ_FLOOR_STOP=1a read whose pool is below itsread-floorshare raisesReadsFloored(a RuntimeError, likeWritesPausedfor writes). The reader turns it into an unreadable read, so the judgment fails closed. This covers the named lookups, the whole-listing fallback pastINDEX_NAMES_CAP, per-FAIL run reads, compares, downloads, commits and GraphQL.pr-require-checks.yml: ci-status sets the variable on its merge-queueevidencecall. In index mode the cold-read estimate, and with it the unfiltered listing read, no longer runs; outside index mode it is unchanged. The index-mode predicate is read once for both of its uses.Risk
Verification
test_babysit_gh_rate_guard.py: 46 OK, including a new test that a single read and a--paginate --slurplisting below the floor are not sent with the stop set and are sent without it.test_babysit_gh.py109 OK;test_babysit_verify_evidence.py431 OK (TheColdReadHeadroomCoversTheListingCapsstill runs the unchangedlisting_pagesandcold_costlines).scripts/check-affected.sh --base origin/main --no-fetch: exit 0, 15 passed over 4 changed files.scripts/run-ruff.sh check: passed.Related
🤖 Generated with Claude Code