Skip to content

Split the slowest free test file so no shard waits on it (GST-3303) - #4588

Merged
capy-ai[bot] merged 5 commits into
mainfrom
test/split-review-pass
Nov 21, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
test/split-review-pass

Conversation

@garrytan

@garrytan garrytan commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Free Tests no longer waits on one 263-second test file. Its 79 tests (80 cases) now run as six files of 25 to 40 seconds, so the shard planner can spread them out.
This is part of making pull request CI faster: a file that big puts a floor under one shard, and that floor matters most on bigger runners.
Nothing to do.

What changed
  • test/review-pass.test.ts is split by topic into six files: the manifest and small units (it keeps the name), the pass program's core flow, the Step 11 second-model reviews, failed second-model reviews and cyber-policy retries, the later steps, and readers on a shared machine.
  • Their shared fixtures (the manifest builder, a feature-branch repo, the fake host, the pass runner) moved unchanged into test/helpers/review-pass-harness.ts. Every test and its comments moved word for word, and the count is the same: 79 tests, 80 cases. The fixtures moved with two edits: ROOT now resolves two levels up, and the repo fixture uses mkdir -p.
  • The duration seed lists the six files. Their values are the per-case times from Free Tests run 44840566118 on CI (estimates; the next weekly recording replaces them), scaled up to the old file's recorded 263 s so they match the rest of the seed. Each is under the 60-second limit, so the allowlist entry for the old file is gone.
  • Windows never ran the old file, because it checks POSIX file modes. The five new files that lost that check are listed as Windows-incompatible, so Windows coverage doesn't change.
  • test/helpers/free-fixtures-data.ts points the cyber-policy fixture at the file that reads it now, and docs/review-policy.md names the new files.
Evidence
  • Locally, one process: the old file took 216 s with all 79 passing. The new files, all six run at once on four cores, all pass.
  • On CI (run 44840566118), after the split, the six files took 24.7 to 40.0 seconds each (run 44875106601).
  • Recent PR runs on the 8-core runner: the shard that holds this file was the slowest in 7 of 28. So the gain on today's runners is a few seconds at most. The point is to let a 16-core trial pay off, which the earlier trial couldn't because this one file set the floor.
Agent notes

Tracking: GST-3303. The Captain ordered this split after #4581 and ahead of change 7, which waits for the tooling freeze to end.

Plan: exempt: audited-list
Plan check: exempt audited-list

Local: typecheck, typecheck:test (no new diagnostics), free-seed-ratchet, free-fixtures, module-size-ratchet, spawnsync-timeout-tripwire, bun-entry-isolation, pregate-selection, test-free-shards, windows-native-workflows and the other windows-curation readers (195 pass).

/ship run ship-4588 at head e274ebf (reviewed tree 87a6d3a9; e274ebf only merges main on top of it):

  • Before review: 9e8f162 changes mkdir src to mkdir -p src in the moved repo fixture (test/helpers/review-pass-harness.ts:45), which test/mkdir-lock-guard.test.ts flagged in quick-bun-default at 6fc8886 (run 44874696156, job 136756816295); 26760ab merges main (ebc8674, base only).
  • Pre-Landing Review: 2 issues, both noted on pass 1 and 2 fixed in round 2 (e208966); 0 deferred. Pass 2 (range 26760ab..e208966): No issues found.
  • Gate edits: 12 listed, 6 read, 0 findings — 0 kept, 0 restored, 0 open. The two RH-1 hunks are the cases moving out of test/review-pass.test.ts; the case titles match the old file and every other old line appears in the new files apart from imports, the ROOT path depth and the mkdir -p fix.
  • Review notes: red-team (p1/red-team#1) and the native adversarial reader (v1/adversarial-native#1) flagged that the release note's 22 to 39 s per file did not match the seed. A second-model read of the decision trail then found the published figures unsupported by the raw data. e208966 replaces them with the post-split measurement from run 44875106601 (24.7 to 40.0 s per file, nested suites counted once), and this body carries the same numbers. The seed values stay as estimates until the next weekly recording.
  • e274ebf merges main (0adfab9, base only, no shared files); the PR's own diff is byte-identical (patch-id 2f622b58).
  • Exploratory QA: pass, 2 probes: the free planner lists all six files, and the Windows list excludes all six.
  • Test coverage audit: 0 new code paths (test-only diff). Scope Check: CLEAN.
  • Documentation: current (re-audit docs-4588-a2 after the changelog fix; docs/, README.md, CONTRIBUTING.md, CLAUDE.md, AGENTS.md; no edits).
  • Tests: focused 12 pass (mkdir-lock-guard, review-pass-step11); the full free suite from pull_request run 44879215070 at e274ebf (1727 files); macOS named regressions job 136770689427 green.
{
  "schema_version": 1,
  "pr": 4588,
  "head": "e274ebfa6cd46003ed63b04092a063ea80d440bd",
  "version": "1.102.1.0",
  "base": "main",
  "gate": {
    "focused": {
      "pass": 12,
      "fail": 0,
      "skip": 0
    },
    "test": {
      "pass": 1727,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44879215070,
      "attempt": 1,
      "tree": "304f6bee0a50c76f948715776593edf0fdc0ff1a"
    }
  ],
  "calls": 20,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/ship-4588",
  "head_tree": "304f6bee0a50c76f948715776593edf0fdc0ff1a",
  "product_patch_id": "61cf76a61d598dab3ddd52ac9100a83bf4bacec1",
  "gstack_version": "1.102.1.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 30,
    "rules": "85b3923b1a978e41",
    "base": "0adfab9dd9c7ee7141d43f5445de052ac34aa01f",
    "registry": "0adfab9dd9c7ee7141d43f5445de052ac34aa01f",
    "gate_scan": {
      "tagged": 2,
      "head": "e274ebfa6cd46003ed63b04092a063ea80d440bd"
    },
    "reasons": [
      "gate-class",
      "runtime=30"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @304f6bee0a50 (8 checks, current for e274ebfa6cd4)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44879215070/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=304f6bee0a50 tests=38618 skipped=67 runs=44879215070/1 profiles=ci-reuse/free-tests heads=e274ebfa6cd4 verified=2026-11-21T07:22:25.583Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, CLAUDE.md, AGENTS.md (changed: docs/review-policy.md)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 2,
    "fixed": 2,
    "scope": "frozen",
    "rounds": 2,
    "est_input_tokens": 117588,
    "ledgers_read": 6,
    "dispatches": {
      "specialist-batched": 2,
      "red-team": 2
    }
  },
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "b3f6f8b4843c0c30",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "61cf76a61d598dab3ddd52ac9100a83bf4bacec1",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}
{"head":"26760ab6a6a924fa2a4934e37d72252894e842f4","run":"ship-4588","status":"started","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":1,"fixed":0,"scope":"frozen","rounds":1,"est_input_tokens":115258,"dispatches":{"specialist-batched":1,"red-team":1}}}
{"head":"26760ab6a6a924fa2a4934e37d72252894e842f4","version":"1.102.1.0","gstack_version":"1.102.1.0","run":"/home/user/.capy/work/ship-4588","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":2,"fixed":0,"scope":"frozen","rounds":1,"est_input_tokens":115258,"ledgers_read":3,"dispatches":{"specialist-batched":1,"red-team":1}},"depth":"full"}

Open in Capy

test/review-pass.test.ts ran about 263 s alone in one shard. Its 79 cases now live in six files of 22 to 39 s on CI, with shared fixtures in test/helpers/review-pass-harness.ts. The seed lists the six files and the allowlist entry is gone; the five new files Windows never ran stay off Windows.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 4 commits November 21, 2026 06:20
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: v1/adversarial-native#1 reader=adversarial-native
Review-Finding: p1/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit ffdd535 into main Nov 21, 2026
52 of 53 checks passed
capy-ai Bot added a commit that referenced this pull request Nov 21, 2026
…303) (#4600)

Free Tests now runs its shards on 16-core Ubicloud runners with eight
test workers each, up from 8-core runners with four. In two trial runs
this took about a minute off the slowest shard; the first five pull
request runs after it lands are the real check.

This is part of making pull request CI faster. Splitting the slowest
test file (#4588) is what made the bigger runner pay off; before that
split, the same trial saved only 16–22 s.

Nothing to do. If the first five pull request runs save less than 45 s
on the slowest shard job, this gets reverted.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@garrytan garrytan mentioned this pull request Nov 21, 2026
capy-ai Bot added a commit that referenced this pull request Nov 21, 2026
- Habits from nine teams, written into gstack. (#4585)
- Three more habits from teams that run evals. (#4602)
- The /ship conductor trial plan gives its real-problem judge one more attempt on fresh labels after it missed its agreement bar twice, and stops the trial incomplete if it misses again (GST-3003). (#4611)
- The /ship conductor trial plan now stops a trial only at the final remote-gate refusal, gives both arms the same note that the brief overrides team rules, and counts every report the no-gstack arm returns (GST-3003). (#4609)
- The /ship conductor trial plan now ends a trial at the remote gate when its case base isn't main, gives the no-gstack arm a test runner, and audits every trial for exposure to the plan (GST-3003). (#4605)
- The /ship conductor trial plan now runs an uncounted pilot in every arm before its counted trials and takes one planned look at half the cases (GST-3003). (#4587)
- gstack's own use on Capy can be counted, and is kept out of real-use numbers. (#4576)
- Free Tests shards finish closer together. (#4578)
- The weekly test-time recording can land again on its own. (#4581)
- The job-log tree.json step's recommended sleep is long enough for real runners. (#4589)
- Pull requests no longer wait on the Trunk flaky-test upload, and the quick tier's flaky passes now reach Trunk. (#4579)
- Windows Setup E2E finishes sooner on install changes. (#4575)
- Skills no longer stop on Codex when they clean up temp files. (#4612)
- /review on Codex with OpenAI models no longer holds back a review that ran its adversarial pass. (#4622)
- Crew threads on Capy now check in at 500M own tokens, standing threads rotate at 250M and any subagent past 50M gets a look, half the old lines, because Capy's token counts read about half what they did before 2026-11-15. (#4582)
- gstack no longer offers to add a `## Skill routing` section to your project's CLAUDE.md. (#4629)
- The README and docs no longer say gstack makes your agent fix more bugs. (#4598)
- `/eval-plan` now writes eval plans that waste less money. (#4591)
- /cso checks every folder above a source file before it looks at the file, so it never looks through a symlinked folder. (#4592)
- Plan reviews no longer read a /design-review audit summary as the branch's design doc. (#4623)
- Node's built-in test files now run with `node --test` in repos that use vitest or jest. (#4626)
- A quarantined test that the runner skipped now fails the run instead of passing it. (#4590)
- A flaky free test is fixed: the spawnSync overflow check no longer fails about once an hour on CI. (#4613)
- Free Tests runs its shards on 16-core runners. (#4600)
- /office-hours asks for ground truth first. (#4468)
- Every startup session ends with a dated test. (#4468)
- /plan-tune's dream cycle now logs each send of your typed answers to Anthropic. (#4621)
- Landing a ready PR no longer depends on a hand-copied gate decision, and the ready note, release PR and squash message say the right thing. (#4596)
- /ship no longer asks for a fresh review because of a stacked parent that main already had. (#4580)
- Results PRs with large captured agent sessions can be reviewed. (#4574)
- /ship no longer stalls on review notes a reviewer already cleared, counts review rounds the way the review policy reads them, and keeps security findings out of the PR body. (#4595)
- /ship's review readers are now told never to stop processes they didn't start. (#4607)
- /ship's review no longer stops when Capy's own drive sync database grows past 100 MB. (#4606)
- /ship's preflight now honors your repository's time limit for rerunning CI-skipped tests, and tells you when a fresh worktree needs its packages installed. (#4608)
- The slowest free test file is now six files. (#4588)
- Step 11.5 keeps a reviewed head current across base-only merges. (#4577)
- On a Capy install, only the owner's opt-in sends telemetry. (#4597)
- New page: working across agent systems. (#4583)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant