ci: shard the push-path contract corpus across four test-linux legs - #4170
Conversation
run-plugin-tests.sh gains --shard I/N, a modulo partition over the sorted discovered suites with affected-tests.sh's semantics: legs are disjoint, their union is the whole corpus, an empty leg exits 0, and the serial allowlist's stale guard still reads the full discovery. test-linux now runs four legs on every event. A push shards the full corpus with --jobs 3 --shard "$LEG/$LEGS", and so does the UNMAPPED fallback on a pull request, which no longer defers to leg 0. Every step after the contract suites runs on leg 0 only through a [ "$LEG" = 0 ] || exit 0 first line: check-docs-only-gate.sh accepts one step-condition shape, and a step that exits 0 reports success, never skipped. The job key, ci-status.needs and lane coverage are unchanged. Refs #3705 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mo9xaZ53JHHy4aBjgd8wK
Temporary, for the #3705 live measurement; reverted by the next commit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mo9xaZ53JHHy4aBjgd8wK
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 encountered an error after 1s —— View job I'll analyze this and get back to you. |
|
Warning Automated review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-run the job, or workflow_dispatch this workflow with the PR number, to retry the review. A new push re-triggers this lane only if the caller's |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Warning Automated security review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
The check is green on purpose, and it is not evidence. It certifies that a security pass ran, and this one did not complete — but the cause is outside this PR's control, so merging is deliberately left unblocked rather than locking every merge for the length of the outage. Nothing was reviewed at this head. Where this check is required, it is satisfied without that evidence; a human should review security-sensitive changes here before merging. Re-run the job, or workflow_dispatch this workflow with the PR number, to retry the review (ci-workflows#227). A new push also retries it only if the caller's Re-running does NOT help for every class:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0c544f030
ℹ️ 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".
The #3705 live measurement is recorded on the pull request. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mo9xaZ53JHHy4aBjgd8wK
Clears check-stale-base-overlap: #4166 also touched .github/workflows/ci.yml. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mo9xaZ53JHHy4aBjgd8wK
Closes #3705
Summary
On a push to main,
test-linuxused to run the whole plugin contract corpus in one job, which took about 550 s. This PR splits the corpus across fourtest-linuxlegs on every event, the same way the affected selection is already split on a pull request. The job key does not change, so the six-job layout,ci-status.needsand lane coverage all stay the same.Two metrics move: how long the test-linux lane takes on push, and how long a push waits for
ci-statusto go green. The whole push run does not get shorter.test-windowsis not inci-status's needs, and it took 713 s on run 34815969269, 603 s of that in theapply-rename.test.shstep. The run's total time stays tied totest-windowsuntil the separate PR that cuts that suite lands.Fix
scripts/run-plugin-tests.shhas a new--shard I/Noption. It splits the sorted list of discovered suites by index modulo N, which is howaffected-tests.sh --shardalready works:ci.ymltest-linux:leg: [0, 1, 2, 3]on every event.LEGandLEGSare set once at job level.scripts/run-plugin-tests.sh --jobs 3 --shard "$LEG/$LEGS".--check/--check-bumpsteps, the Node sub-projects and disk-hygiene. Before, they ran on all four legs of a PR and once on the single push leg.[ "$LEG" = 0 ] || exit 0, not a stepif:.scripts/check-docs-only-gate.shaccepts exactly one condition form on a gated step. A step that exits 0 reportssuccess, neverskipped, andci-statusfails onskipped.Verification
Local checks:
bash scripts/run-plugin-tests.test.sh: PASS=67 FAIL=0. The new cases check that:2/2,x,1,1/0and''exit 2bash scripts/affected-tests.test.sh: PASS=76 FAIL=0. It includes the live check that ci.yml passes the leg into--shard.scripts/check-docs-only-gate.sh --checkpasses.scripts/check-lane-coverage.sh --checkpasses. Their test suites pass 64/0 and 40/0.actionlint,zizmor --offline,shellcheck,shfmt -dandcheck-shell-portability.sh --pathsall pass.Live measurement: the probe commit b0c544f, reverted in 8e98db1, forced this PR's contract step onto the push branch. Run 34884762048, all four legs green:
The legs sum to 347 suites, which is the whole corpus. The serial counts sum to 18, the whole allowlist. Leg 0 also carries the roughly 80 s of steps that run only once. Leg 1 is the slowest at 205 s and runs none of them. Moving those steps to any other leg would push that leg above 205 s, so leg 0 is the best place for them.
Before, on push:
test-linux556 s, of which the contract step took 444 s.ci-statusfinished 583 s into the run.test-linux549 s.ci-statusfinished 584 s into the run.After:
ci-statuson push is now set bylint, which finished 516 s and 512 s into those same two runs. I expectci-statusto finish around 515 s into a push run instead of 583 s, about 65 to 70 s sooner. This is an estimate: nothing has run on a push to main yet. Making lint faster is out of scope here.The probe run's
lintfailed only oncheck-stale-base-overlap, because #4166 landed on main and also touchedci.yml. Merging main in fixed it.Related
--jobs 3), tool-honesty and jira conformance suites fail under run-plugin-tests --jobs 4, pass serially #3694🤖 Generated with Claude Code
https://claude.ai/code/session_019mo9xaZ53JHHy4aBjgd8wK