Repository navigation
fix(scripts): end a local check-affected --tests run at its budget - #12756
Conversation
The budget only reported an overrun, so a large selection ran far past it and stalled every ready flip. check-affected now sets a deadline at the run's start and hands it to run-plugin-tests.sh, which starts no suite after it. tests reads as a SKIP naming each suite left to CI. A suite that ran and failed still fails the run. The deadline travels in environment variables that only check-affected sets, so a CI run, with or without --budget, still runs every suite it selects. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q4SUwLX9M3bKXJidsD
When the budget leaves suites and other selected suites have no local runner, the skip line now counts both, since run_check keeps only the last line. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q4SUwLX9M3bKXJidsD
A deadline 2 s away can leave about 1 s once the clock is read in whole seconds, too little for a loaded runner to launch the first suite. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q4SUwLX9M3bKXJidsD
Under check-affected --tests, changed-skills ran each changed skill's script tests with no deadline, so a skill-touching branch could run past the budget. Check 7 of check-skill.sh now reads PLUGIN_TEST_DEADLINE: no script test starts after it, each one left prints a SKIP line, and with no failure the run ends INCOMPLETE at exit 3. check-changed-skills.sh reads that as its could-not-look exit, so changed-skills is a SKIP. With the variable unset every script test runs, which is how CI runs them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q4SUwLX9M3bKXJidsD
…corded results A failed Node package ended the loop, so later packages neither ran nor got named; each now runs until the deadline and the run still fails at the end. A suite can reach its own left marker, so a recorded result now outranks that marker, and the marker counts only on a run with a deadline. The check skill and the ready reference now state what a budget-ended run does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q4SUwLX9M3bKXJidsD
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: no security issues foundI read every hunk of all 12 changed files. The change adds a local deadline to the test runners: What I checked:
Instruction surfaces: the PR context: no embedded instructions aimed at this lane. Spend: a budget-limited local critical-findings: 0 |
|
claude-review reviewed Code review: PR #12756, a local
|
Closes #12639
Summary
A local
scripts/check-affected.sh --testscould run far past its 120 s budget, which stalled the ready flip: nothing stopped the run, and--budgetonly warned. The budget now ends a local run. Suites past it are named and left to CI, which runs the full set either way.Fix
check-affected.shsets a deadline once at run start, so the static tier and selector count against the budget, and passes it to the runners throughenv.run-plugin-tests.shchecks it before each suite,check-affected.shbefore each Node package, andcheck-skill.shcheck 7 before eachscripts/*.test.sh.SKIPline. A suite that ran and failed still fails the run, with the left ones still named. A later Node package still runs after an earlier one fails.run-plugin-tests.shcounts a.leftmarker only when a deadline is set and no.rcwas recorded.check-skill.shexits 3 with anINCOMPLETEline when a deadline left script tests and nothing failed;check-changed-skills.shmaps that to a skip.CI is unaffected: no workflow sets
PLUGIN_TEST_DEADLINE,--budgetalone stops nothing, and workers unset it for nested runs.Verification
Run by the worker and again by a fresh verifier on
6a065f21ee, each reading exit status directly:check-affected.test.sh(123 pass),run-plugin-tests.test.sh,check-changed-skills.test.sh,check-skill.test.sh. New cases were seen failing first. Changelog fragment checks pass.A real
--testsrun at1772c34356, before the last fix round: 210 s against the 120 s budget, overlapping another run, naming 91 suites left. An earlier run measured 150 s, with one suite taking 88 s. So "budget plus one suite" holds approximately; the suite durations of the 210 s run were not captured.Known limits:
--testsrun on a committed skill change was not run. Evidence for that path is the changed-skills gate alone, 22 s against a 20 s deadline, plus suite cases.setup-env --nodeand non-suite gates, includingcheck-skill's static checks, still run past it.readyrecords verify aspassfrom a sample, andci-statusstill gates the merge. This repository has that step off (docs/conventions/source-control.yaml)..leftand kills its worker reads as left locally. CI sets no deadline, so the same suite fails there.--jobs 1. Not changed.plugins/skill-quality/skills/check/evals/evals.jsonstill describes PASS or FAIL from the exit code. Exit 3 needs the deadline, which that skill's path does not set.Related
plugins/source-control/skills/pull-request/reference/ready-for-review.mdnow says a first flip runs the suites up to the budget.🤖 Generated with Claude Code
https://claude.ai/code/session_01VQb9Q4SUwLX9M3bKXJidsD