Repository navigation
Run large unit suites on Linux instead of failing with argument list too long (#4424) - #4426
Merged
Merged
Conversation
…too long A lane passed every unit file in one bash -c argument; Linux caps one argument at 128 KiB, so thousands of files failed with E2BIG. Split the file list into byte-bounded chunks run in sequence and read back as one run, and classify E2BIG as its own arg-limit cause. Fixes #4424 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Put the failing fixture file last after sorting so the arg-limit test really checks a failure in the final chunk. Review-Finding: p1/specialist-batched#1 reader=testing 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>
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 17, 2026
- /autoplan's approval page no longer hides a reviewer's product objection behind "keep your direction". (#4431) - Every skill that loads the shared preamble, on every host, now says to ask a question once and to check a file before handing it over. (#4383) - The Captain manuals now name the `Failed or skipped:` and `Also changed:` lines that READY and lane reports carry. (#4432) - gstack's shell locks hold again on Ubuntu 26.04, where `mkdir` reports success when another process won the race (GST-2247). (#4262) - `test/gstack-lock-race.test.ts` runs the old pattern and the helper against a PATH shim that behaves like uutils 0.8.0 `mkdir`, so it runs on any runner image: the old pattern lets two of four racers win, the helper admits exactly one in each of 60 races and never overlaps across take, hold and release loops, and parallel `gstack-config` writers keep every key. (#4262) - Windows Setup E2E now runs when `bin/gstack-lock.sh` changes. (#4433) - Claude Code's skill list now says when to use each gstack skill, so Opus loads /review and /plan-eng-review when a request fits. (#4387) - A pull request's merge head can no longer keep its `/ship` receipt without a full review. (#4365) - `/ship` now counts review rounds per pull request, and the head that merges always gets a full review. (#4360) - /ship's documentation audit no longer accepts a passing result when an earlier line from the same audit said "blocked". (#4434) - /ship's documentation audit no longer spends an attempt when the audit child writes text after its result. (#4285) - The README lists the two new guides, and the install doc counts its hooks right. (#4403) - docs/releases.md now says the stable release cut treats a failed commit status as red and a pending one as still going, as it has since #4257. (#4436) - /ship's `finish --docs-requested` now accepts a docs fix when the audit named the file with a line number. (#4437) - Document the `.gstack/approval-classes.json` schema, `gstack-approval-classes` CLI commands, and owner approval citation format in `docs/ship-policy.md#approval-classes`. (#4355) - `/eval-plan` now runs four result checks instead of leaving them to judgment. (#4384) - The /review coverage-audit eval no longer fails a run that really read the source file when zsh stops a command line at an `echo ====` separator. (#4364) - Sixteen in-repo documentation links reach their section again. (#4394) - gstack agents now open every status report with what failed, what they didn't verify and what else they changed. (#4273) - Two new short guides. (#4380) - A skill you wrote whose contract still lists `check_after_last_edit` keeps the rest of its contract. (#4439) - The ship policy guide now explains how to merge any pull request with `gstack-ship-queue land`, even in a repository with one maintainer. (#4377) - /ship's test step runs a large unit suite on Linux. (#4426) - Every skill that loads the shared preamble, on every host, now says never to print a whole environment, git config or process table. (#4382) - Pull requests from /ship now open with at most three plain lines, and every merge lands as one commit titled with the PR title. (#4438) - `gstack-pr-wait`, `gstack-ci-gate` and the release cut no longer call a commit green while a check on it failed. (#4257) - `gstack-runaway` now says what a thread's cold and empty wakes cost, not just how many there were (GST-2770). (#4385) - The optional Stop hook no longer checks for a test run after the last edit, and /verify asks for it in plain words instead. (#4428) - /ship's test step says when it ran out of time, and you can set its budget. (#4429) - The remote test command no longer puts every file on one command line. (#4429) - The stable release no longer waits on the nightly Windows tests (GST-2815). (#4400) - Ubicloud fan-outs can no longer overshoot the vCPU limit, and owners no longer delete each other's VMs. (#4430) - hono is pinned to 4.13.16, which fixes five advisories the weekly OSV scan found in 4.13.13 (gstack#4406). (#4408) - `package.json` overrides (#4408) - `test/dependency-security.test.ts`: the lockfile floor check now covers `hono >= 4.13.16`. (#4408) - The nightly Windows test run finishes again. (#4409) - A short write-up checklist in ETHOS.md. (#4381) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
/ship's test step now runs a unit suite with thousands of files on Linux instead of stopping with
E2BIG: argument list too longbefore any test runs. It keeps gstack's merge checks working on large repositories such as gbrain, which has 5,567 unit files.What changed
Before: a lane over Linux's 128 KiB per-argument limit stopped with
the runner could not be launched (700 files): E2BIG: argument list too long, posix_spawn 'bash', and the fix text said to install a missing tool. After: the same lane passes with700 tests ran in 700 file(s), exit 0, and a launch that still hits the limit is reported asarg-limit, not as a missing tool.Why
gbrain's merge check stopped with
PREGATE: incompleteandE2BIGon its 5,567 unit files (#4424). gstack put every unit file of a lane into one command argument, and Linux caps one argument at 128 KiB. A big file list now runs as several runner processes of about 96 KB each (24 KB on Windows), read back as one run, so any failing chunk still fails the lane.Blast radius
Only a unit group whose quoted file list passes the limit changes; a group that fits in one process runs the identical command, because
runOncereturns its single part unchanged (read at lib/pregate/checks/lanes.ts:414). CI's free suite passed at 7eeef79 (run 44026832699, 1,672 test files), and the remote-gate path is untouched.Summary, tests and review
Summary
A team running /ship on gbrain hit
E2BIGbefore a single test started, with advice to install a tool that was already installed. Lanes now split a large file list into byte-bounded chunks run one after another under the group's one deadline, add up their counts, and let the first unfinished or failing chunk decide the result. AnE2BIGlaunch failure gets its own environment kind,arg-limit, whose fix says to report it as a gstack bug. The review round made the new test put its failing file in the last chunk, and the docs audit noted the Windows chunk size.Test Coverage
Tests: 1791 → 1791 (+0 new; the PR adds test/pregate-lanes-arg-limit.test.ts, counted before the audit)
Coverage: 67% value-weighted (67% including 0 weakly covered paths), 4 gaps. 0 tests added.
Test value: 0 tests written, 0 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered.
Coverage gate: 67%, between the minimum 60% and the target 80%; the audit ran audit-only (no generation in this run), so the gaps below are proposed tests.
Tests ran: free 1672
Pre-Landing Review
Pre-Landing Review: 8 issues — 1 auto-fixed, 0 asked (0 fixed, 0 skipped), 0 deferred, 7 noted.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/pregate/checks/lanes.ts:468The PREGATE_INCOMPLETE timeout detail says --timeout applies to each runner process, but chunks of a split unit group now share one deadline, as docs/pregate.md says; the message names the wrong scope for a chunked group.lib/pregate/checks/lanes.ts:502The undeclared remote fallback (ubi-runner.sh run -- '') still inlines the whole file list into one bash -c argument, so a huge selection routed remotely on a <8-core machine can still hit E2BIG; pre-existing, and the new arg-limit fix text suggests the remote route.lib/pregate/checks/lanes.ts:417Outside voice (stated High, Blocks: yes): summing ran across chunks lets a zero-test chunk pass beside a chunk that ran tests, so the ZERO-RUN guard does not see it. Lead judgment, below the floor: the guard is per runner process and a unit group was one process before this change, so an unsplit group whose files partly ran zero tests already summed to a positive count and passed; a whole-group zero still sums to 0 and is still caught. No test fails and no lane that failed before now passes; failing a zero-test chunk would make a split group stricter than the same files in one process (for example a chunk of win32-skipped files). Named for the owner in Review notes.lib/pregate/checks/lanes.ts:468Native voice 1 (Low): the timeout detail says --timeout applies to each runner process, but a split group's chunks share one deadline; macOS is also capped at 96 KiB though it has only the 1 MiB total limit, so a large macOS group now runs as several processes under one deadline. Same location as p1/specialist-batched#2.lib/pregate/checks/lanes.ts:415Native voice 2 (Low): bad prefers the first unfinished chunk, so a later chunk that fails to launch reports PREGATE_ENVIRONMENT even when an earlier chunk had counted test failures; the lane still fails (misattribution only).lib/pregate/checks/lanes.ts:416Native voice 3 (Low): noBrowsers survives aggregation only when every chunk has it, so a split Playwright group where one chunk shows no browser error reports PREGATE_LANE_FAILED instead of the missing-binary environment cause; the lane still fails.lib/pregate/environment.ts:26Native voice 4 (Low): the arg-limit rule also matches runner output printed before the first counted test (proof output), the same risk every output rule carries; investigate only if it shows up.Exploratory QA
Functional surface, smoke budget (5 minutes): 2 probes on fixture repositories, both pass. Probe 1: a 700-file unit group whose quoted list is over 128 KiB passes with 700 tests in 700 files. Probe 2: the failing file sorts last, so only the final chunk fails; the lane fails with
PREGATE_LANE_FAILED, 1 failed of 700 ran. A first probe set was blocked by the probe's own inherited install-verdict environment and was rerun with it unset. Not probed: stall, timeout, Playwright and unparsed-count chunks, and the remote route.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Review bot comments
No review bot comments.
Scope Drift
Scope Check: CLEAN
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.
Issues
Fixes #4424
Refs p1/specialist-batched#1
Verification Results
No plan obligations (bug fix, no plan bound). Exploratory QA: 2 PASS, 0 FAIL, 0 BLOCKED on current inputs.
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. One factual correction in docs/pregate.md; no blockers.
Scope: committed diff 5dcd76b..3c1a808 (6 files: lib/pregate/checks/lanes.ts, lib/pregate/environment.ts, lib/pregate/types.ts, test/pregate-lanes-arg-limit.test.ts, docs/pregate.md, changelog.d/lanes-large-file-lists-on-linux.md); no staged, unstaged or new files.
Documentation health
arg-limit; added the 24 KB Windows chunk budget next to the 96 KB figure.Coverage debt: the
arg-limitenvironment kind and file-list chunking have reference coverage in docs/pregate.md only, with no how-to; acceptable for an internal runner detail.argBudgetandargChunksare exported for tests and are not public surface.Diagram drift: none.
Test plan
Known gap: the
PREGATE_ENVIRONMENTentry in docs/troubleshooting.md does not listarg-limityet (found by the first docs audit; not edited in this PR).Agent notes
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=7 fixed=1 scope=frozen ledgers_read=5 fix_checks=1 dispatches=3 est_input_tokens=13241
Gate edits: none detected (1 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: completed (host-subagent, openai/gpt-6.1-sol); 1 finding, noted below the floor.
Approvals
No approvals recorded for branch capy/run-large-unit-suites.
Plan: exempt: bug fix
Plan check: exempt bug fix