Repository navigation
v1.92.47.0 fix(ship): /ship Step 5 runs test lanes one at a time on 4 cores or fewer, with --lanes serial|parallel (GST-851) - #3821
Merged
Conversation
…er, with --lanes serial|parallel (GST-851) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…nd names --lanes (GST-851 docs audit) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
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
preflight with two lanes on a 4-core machine: main starts both at once; this branch runs one at a time and prints LANES: serial (4 cores).
Before/after as text: preflight with two lanes on a 4-core machine: main starts both at once; this branch runs one at a time and prints LANES: serial (4 cores)
Why
On garrytan/gstack-evals#115, GSTA-2 watched
/shipStep 5 start six lanes (a 1,451-test bun suite, tsc, a Docker tier and an arm tarball trial) within 60 ms of each other on a 4-core, 16 GB machine, and running lanes together has taken machines down before (gstack-evals #101, #106, #107). Folding every command into one lane is not a fix, because the receipt reads each lane's owntests_ran. Now preflight runs lanes one at a time on 4 or fewer cores, keeps every lane's count, and--lanes serial|parallelpicks the mode by hand (GST-851).Blast radius
runLaneshas one other caller,gstack-ship-release finish, which passes a single lane and keeps the old default (all at once), so its behavior is unchanged (read at lib/ship-release.ts:305). The newLANES:line cannot be read as a lane because consumers matchLANE:with the space (checked by grep over lib, bin and scripts, and by both reviewers).Approvals
No approvals recorded for branch gst-851-serial-lanes.
Plan-first exempt: a bug fix the Captain diagnosed and filed as GST-851 (crew rule "Fix-lane exemption"; Captain: "No /autoplan (bug fix)").
Summary
GST-851 asked for a policy key or flag so a small machine stops running every Step 5 lane at once. This PR ships the flag and a core-count default:
os.availableParallelism()is 4 or less, and all lanes at once above that.--lanes serialor--lanes paralleloverrides the default. Any other value, or--laneswith no value, exits 2.LANES: serial|parallel (--lanes|<n> cores)line before theLANElines says which mode ran and why. Each lane keeps its ownLANEline andtests_ran, in the order given.min_gstack_versionbump, and the core-count default already covers the reported 4-core case. A repository that wants serial lanes on a bigger machine passes--lanes serial.ship/sections/tests.md.tmpl) now says lanes run one at a time on 4 or fewer cores and names--lanesandLANES:(+66 bytes, size-ledger entrytest/size-ledger/ship/gst-851-serial-lanes.json).Failing-first proof. The new
--lanes serialtest fails on main 1ea8692: with--lanesignored, the lane log reads "start b", "start a", so both lanes ran at once. The image above shows the same thing outside the test.Security read. No network calls, environment or secret reads, permission changes, workflow, setup or install edits, or new dependencies.
Test Coverage
All new code paths have test coverage:
laneConcurrency(default by core count, both overrides, a bad value), the bare--lanesusage error, serial order, parallel result order when a later lane finishes first, and the unflaggedLANESline (test/ship-preflight.test.ts, three tests).Tests ran: ship 87
Tests ran: skill 635
Pre-Landing Review
Pre-Landing Review: 3 issues — 2 auto-fixed, 0 asked, 0 deferred, 1 noted (the noted Step 5 prose drift was later fixed through the docs audit).
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=2 scope=frozen fix_checks=2 dispatches=4
Gate edits: none detected (3 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: openai/gpt-6.1-sol read the code diff (round 1) and the final diff with the changelog numbers (round 2); no findings either time. Native adversarial (claude-opus-5-5): four Low notes, none blocking. Two review rounds, the R51 cap.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
ship/sections/tests.md.tmpl:12The /ship Step 5 prose still says preflight runs 'every lane in parallel inside the evidence ledger'. That prose is in the template and in the generated ship/sections/tests.md:216, and it is the only interface the agent reads. On a machine with 4 or fewer cores, preflight now runs lanes one at a time by default. Every Capy cloud machine is in that group (os.availableParallelism() returns 4 here). So an agent following the skill expects parallel wall-clock time while it gets the sum of the lane times. The skill also never mentions the new--lanes serial|paralleloverride or the newLANES:output line, so neither can be found from the skill. The specialists only looked at the bin's code and tests. Nothing catches this drift: the code change left the template untouched, so gen:skill-docs freshness passes, and binding-template-drift.test.ts only checks the command string.Update to the review note above: the Step 5 prose drift was fixed afterwards in commit 043f86f, through the docs audit (a851-1 blocked on it, the re-audit a851-2 came back current).
Open notes (below the blocking floor, not fixed):
--lanes serialcovers it (adversarial, INVESTIGATE).--lanes serial --lanesis read as serial because the flag reader takes the last value (fix-check 2).--lanes=serialis ignored like every other=flag, and--laneswithout any--laneis accepted and ignored.LANES:line uses one of preflight's 30 output lines.Eval Results
Paid evals not run in the lane; they are pending the train gate (
gstack/full-gate, pre-approved). At 043f86f the selector picks 113 behavioral probes and 24 quality judges, driven by the derived referenceslib/ship-bin-common.tsandlib/ship-preflight.ts, andgstack-ship-queue readyrecommends--no-screenbecause the train gate's full census covers them.Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). Fix: add "Plan: " to the PR body, or run /autoplan.
TODOS
No TODO items completed in this PR.
Documentation
Status: current — re-audit a851-2 of gst-851-serial-lanes (1ea8692..043f86f, clean working tree) found no stale docs; a851-1's Step 5 blocker is fixed by 043f86f.
Scope: the committed diff (lib/ship-bin-common.ts, lib/ship-preflight.ts, ship/sections/tests.md(.tmpl), changelog.d fragment, test, size-ledger entry) plus every tracked .md/.tmpl that mentions preflight lanes, lane concurrency, --tests-only or LANE output (ship/SKILL.md.tmpl, ship/DRIVER.md.tmpl, docs/pregate.md, docs/troubleshooting.md, docs/ship-policy.md). No staged, unstaged or new files.
Documentation health:
--lanes serial|parallel, and printsLANES:)Coverage debt:
--lanes serial|paralleland theLANES:line are documented as reference and how-to in ship/sections/tests.md and the preflight help text; the explanation exists only in the changelog fragment, with no tutorial (common gap). Diagram drift: none.Test plan
gstack-ship-preflight --tests-onlylane ship (ship-preflight, ship-preflight-base-ancestor, pregate-head-policy, ship-driver, ship-rereview-triggers, binding-template-drift): exit 0, tests_ran 87bun run typecheck: no errorsUBI_OWNER=gsta234), tree aed5c116: 18,401 tests ran, 0 failed, $0.07, VM destroyedNote: the lanes unset the gstack launch variables (
GSTACK_CAPYand the rest) inside the lane command. With them set, nine tests in pregate-head-policy, ship-preflight and ship-rereview-triggers fail on main 1ea8692 as well, so that is an existing test-environment leak, not this change.🤖 Generated with Claude Code