Repository navigation
fix(source-control): refuse pre-since legacy FAILs and retry the FAIL index pre-read - #12370
Conversation
… index pre-read legacy-fails now refuses, writing nothing, when the whole artifact listing holds a FAIL uploaded before --since, naming the earliest such artifact, its run and upload time. A FAIL of a run created before --since but uploaded at or after it is still added through the listing. The listing keeps each FAIL's created_at; a checkpoint whose listing lacks it lists again. upload-fail-index reads the run's artifacts up to three times, 5 s then 10 s apart, before failing on a read that fails or misses its count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new --checkpoint path would start a fresh <checkpoint>.window file and reset the per-window call cap; tell the operator to remove the checkpoint file and run again instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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-review reviewed Code review: no findingsI read every hunk in all 6 changed files. I also read the code around
Tests: the new Python tests cover the refusal message (earliest artifact, its run and its time), a missing creation time, and re-listing an old checkpoint. I did not run any tests. The PR's pytest and Changelog fragments: both are Closing issue: none. The PR is a follow-up to #12302 and states no acceptance criteria to check. The PR context contains no embedded instructions. Spend: when the pre-read keeps failing, the retry adds up to about 15 s of runner time per |
|
claude-security-review reviewed Security review: PR #12370I found no security issues in the six changed files. I read every hunk of each one. critical-findings: 0 Trusted path checked:
Other files: the two tests and the two changelog fragments have no security surface. The tests use stand-in Other notes:
|
No related issue: follow-up to #12302's security review
Summary
Two non-blocking security follow-ups from #12302 (the exact-name FAIL index, squash commit 23dfa3f):
legacy-failsrefuses a FAIL uploaded before--since. The build lists runs from--sinceon and adds the rest through one whole artifact listing that carries no count check. A FAIL uploaded before--sincemeans--sincewas set too late, so the build now refuses with exit 1 and writes nothing. The message names the earliest such artifact, its run and its upload time, and tells the operator to lower--sinceto at most that time, remove the checkpoint file and run again. A FAIL of a run created before--sincebut uploaded at or after it (a re-run or a late judgment) is still added through the listing.upload-fail-indexretries its pre-read. The read ofactions/runs/<run_id>/artifactsand its count check get three attempts, 5 s and then 10 s apart, before the step fails. Before this change, one transient API error failed the step, and the FAIL judgment was left with no verdict.Fix
(a)
babysit_verify_evidence.py,_PerRunBuild_listing_failsnow keeps each listed FAIL'screated_at._uploaded_sinceruns after the listing is read and after the second running-status check, and before any listed run is read by id. It refuses on:created_at, which fails closed;--since, naming the earliest.listedarray has an item without acreated_atkey reads the listing again. Every finished window and run in it is kept, andLEGACY_CHECKPOINT_VERSIONis unchanged.--checkpointpath. The pacer keeps its per-window call count in<checkpoint>.window. A new path would start a fresh count and reset the cap inside the same GitHub reset window.(b)
.github/actions/upload-fail-index/action.ymltotal_countcheck sit in a loop of three attempts, withsleep 5andsleep 10between them. Each failed attempt logs a::warning::that names the reason. The last one logs::error::and exits 1.Verification
pytest plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_verify_index.py: 38 passed. Three tests are new:--sinceFAILs. Two listed FAILs uploaded before--sincerefuse, the message names the earliest (artifact 90 of run 9 at 2026-10-13T20:00:00Z), nothing is written, and run 9 is never read.created_atrefuses.created_atreads the listing again.--sinceis added through the listing" passes: run 8 was created before--sinceand uploaded its FAIL after it. TheRunsGitHubfixtures now give each artifact an upload time inside its run's hour.node --test .github/scripts/pr-verify/workflow.test.mjs: 32 pass. Theupload-fail-indexcase, run with a stand-inghand a stand-insleep, checks four things:action.yml, the case fails: it got 1 read and no waits, where the test expects 3 reads and waits of 5 and 10.scripts/run-ruff.sh checkon both Python files: clean.Related
🤖 Generated with Claude Code