Repository navigation
v1.92.60.0 test-free-shards: --ci-run --jobs k sub-shards inside one CI job (k=1 default) (GSTA-203 PR 2) - #3730
Merged
Merged
Conversation
… default), per-file JUnit counts (GSTA-203 PR 2) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ister shard-jobs.ts in ship-measure touchfiles Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…icter --ci-verify records, unique count paths, no serial launch without wall Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s FREE_ONLY entry is non-behavioral Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…text names the wall the parallel phase left Adversarial pass 2 (GSTA-203 PR 2): a plain relative path now matches a planned file exactly, and an absolute or ../-prefixed path matches only when its prefix is the child's root, so an unplanned browse/test/x.test.ts is never credited to test/x.test.ts. The serial sub-shard's FREE_SUBSHARD_TIMEOUT text says how much of the shard wall the parallel phase left it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ds (docs audit docs-203-1) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
4 tasks done
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # scripts/harness-version.json
Contributor
|
Flaky: free-suite (6) failed on attempt 1 from a Bun runtime segfault (panic: Segmentation fault in a pty worker and in bin/gstack-pregate), which cascaded into 9 test failures. Rerunning only that shard at the same head (c67821d) passed. Logged in the crew flaky ledger. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
bun run scripts/test-free-shards.ts --ci-run <plan> --shard N --jobs kcan now split one planned CI shard into k sub-shards inside the same job. The default is k=1, and no workflow passes--jobsyet, so CI runs exactly as before. PR 3 of GSTA-203 picks k per shard and per runner.All four proof runs passed with the same counts: 1,329 tests (1,326 pass, 3 skip), 8,874 expect() calls, 72 counted files, zero per-file count differences between k=1 and k=4, and no retry. The k=4 split was one serial sub-shard of 3 files plus three parallel sub-shards of 23 files each. The proof VM (ubirun-gsta203-1793470196-3d9d0880-t2) cost about $0.11 and was destroyed afterward. Those VM numbers come from a test command on a VM, not a GitHub job, so they leave out the job's waiting and setup time.
Why
GSTA-203 is the plan to make CI much faster. The audit showed that free-suite jobs spend most of their time running tests one file after another on a machine with idle cores. Running several sub-shards at once inside one job uses those cores without adding jobs, waiting time or setup time. This PR builds the runner and its safety rails; PR 3 turns it on.
Blast radius
scripts/lib/shard-jobs.ts(with a module-size ratchet entry), wired intoscripts/test-free-shards.tsonly for--ci-run.scripts/lib/shard-engine.tsand every workflow file are unchanged.test/test-free-shards.test.ts,test/ubicloud-pregate-remote.test.ts), the ship-measure touchfiles entry,scripts/test-pr-profile.ts(free-only path) andscripts/harness-version.json(non-behavioral note) each gain the new file.Behavior changes
outcome.counts(per-file tests, pass, fail, skip, todo and expects from JUnit) andoutcome.inFlighton a timeout.--jobsis accepted only with--ci-run. A bad value, or k larger than the shard's file count, fails withFREE_JOBS_INVALID. So PR 3 must pass k per shard, and the exclusive host-state shard stays at k=1.FREE_SUBSHARD_TIMEOUTwith the file, k, runner, run id and a serial reproduce command. Sub-shard records that fail validation printFREE_SUBSHARD_REJECTED, and--ci-verifyfails closed on missing or altered sub-shard records.SLOW_UNDER_LOADstarts empty.--jobsadoption belongs to PR 3.Approvals
Source: gstack-approvals record for gsta203-pr2-subshards (display only; not an approval citation).
Pre-Landing Review
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=4 fixed=0 scope=frozen fix_checks=3
Gate edits: three untagged test copy-list hunks (test/helpers/touchfiles-data.ts, test/test-free-shards.test.ts, test/ubicloud-pregate-remote.test.ts), each adding
scripts/lib/shard-jobs.tsto an existing list. No gate was loosened.Reviewers: specialists, red team and native adversarial passes on anthropic/claude-opus-5-5; outside voice on openai/gpt-6.1-sol. The review loop stopped at its fix-cycle cap, and the lane's parent ruled under crew rule 23 that none of the items below reaches the blocking floor (fail a test, break production, or lose data or secrets). They ship as informational notes, unfixed. Item 4 came in with commit 8ab672c, the last fix commit in this PR.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
scripts/lib/shard-jobs.ts:114A ../-prefixed JUnit path whose stripped remainder is a planned file is credited without the root check (exact-match early return). Pinned on purpose by test/shard-jobs.test.ts:303, which stays as it is. Counts are evidence only.scripts/lib/shard-jobs.ts:111The root check ignores how many ../ segments a printed path has, so a same-named directory outside the root could be credited. Unreachable with the child's cwd at the repo root; counts are evidence only.scripts/lib/shard-jobs.ts:111Absolute JUnit paths are compared as exact strings, so a drive-letter case difference, ./ or a trailing slash on the root marks that file's counts incomplete. Bun prints relative paths with cwd at the repo root.scripts/lib/shard-jobs.ts:332Introduced by 8ab672c: the strict wallTimeoutMs < shardWallMs comparison gives nearly every real serial timeout the 'lower --jobs' advice, including all-serial shards and a slow serial file after a fast parallel phase. Message text only.Base merge
main at a563f47 (v1.92.51.0, #3806) was merged in once under GStack Minder's rule 19 grant, as merge commit f058f17 with no rebase, because #3771 is stacked on this branch. The one conflict was the
scripts/test-pr-profile.tsentry inscripts/harness-version.json: both FREE_ONLY_PR_FILES additions are kept, and the entry is re-pinned to the merged blob with one non-behavioral note. One scoped fix-check on that resolution found nothing.Documentation
Scope: re-audit after merging origin/main a563f47 (GSTA-203 PR 1). Reviewed docs/TESTING_INTERNALS.md (real-home tripwire bullets, Sub-shards inside one CI job, Windows free lane), CONTRIBUTING.md and the changelog fragment against main's windows-smoke/windows-free-tests text.
Result: current, no edits. The default k = 1 keeps every workflow unchanged, including the nightly windows-free-tests serial --ci-run, and windows-smoke stays the required Windows PR check.
Debt: when a workflow first adopts --jobs, the docs should name it.
Earlier audit (docs-203-1, before the base merge):
Status: updated: one factual correction in docs/TESTING_INTERNALS.md, no blockers.
Scope: base 5ba425a to head f7eb79f on gsta203-pr2-subshards: 4 commits, 11 committed files, nothing staged, unstaged or untracked. I read the new
--ci-run --jobs ksub-shard runner (scripts/lib/shard-jobs.ts,scripts/test-free-shards.ts), the changelog fragment, and every authored doc that mentions the free runner,--ci-runorGSTACK_FREE_JOBS. The banned-terms check found no list.Documentation health:
docs/TESTING_INTERNALS.md: Updated. I checked the new "Sub-shards inside one CI job" section against the code (flag limits, sub-shard ids, serial trailing sub-shard, wall budget, merge before the 5-file retry cap,--ci-verifyrecords, JUnit counts), and it is accurate. The "Real-home tripwire" bullets now say that parallel sub-shards at--jobs k > 1share one HOME under the phase guard, while a--jobs 1CI shard and the trailing serial sub-shard each own their window.changelog.d/gsta203-pr2-subshards.md: Current. Read only.CONTRIBUTING.md,CLAUDE.md,AGENTS.md,docs/TEST_PORTFOLIO.md,docs/PROJECT_STRUCTURE.md,docs/troubleshooting.md: Current.Coverage debt:
--ci-run --jobs k: reference and explanation in TESTING_INTERNALS; no how-to row in CONTRIBUTING's command table (no workflow passes--jobsyet).FREE_JOBS_INVALID/FREE_SUBSHARD_TIMEOUT/FREE_SUBSHARD_REJECTED: reference in TESTING_INTERNALS only; no troubleshooting.md entries.scripts/lib/shard-jobs.ts: not in docs/PROJECT_STRUCTURE.md's tree, which already leaves out other free-runner lib modules.Diagram drift: none. No diagrams name the free runner's modules.