Skip to content

v1.91.120.0 test: split the doctor windows bash test so each case fits the Windows per-test timeout - #3241

Merged
capy-ai[bot] merged 4 commits into
mainfrom
capy/doctor-windows-bash-split
Oct 17, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
capy/doctor-windows-bash-split

Conversation

@garrytan

Copy link
Copy Markdown
Owner

The windows bash doctor test from #3236 timed out on Windows (run 39003503231, shard 5) because the test is too slow, not because something hangs. It ran five full bin/gstack-doctor passes in a single test. Each pass takes up to about 6 s on a Windows runner, so the test's wall time across the last six Windows runs was 20.5, 21.5, 28.2, 28.6, 30.0 (a pass) and 30.0 s (the timeout).

The EBUSY cleanup error is fallout from the timeout. When a test times out, Bun 1.4.2 SIGTERMs the spawnSync bash child it is blocked on, but the doctor's own children (the bun/git subprocesses, with their cwd in the fixture) survive. On Windows those survivors lock the fixture directory, so afterEach's rmSync fails. This reproduces locally with bun test --timeout=2000 on a spawnSync child that forks a grandchild: Bun reports "killed 1 dangling process", the test fails at about 2000 ms, and the grandchild keeps running to completion.

This PR splits the test into three tests, one per case, each with its own fixture and at most two doctor passes:

  • the resolved bash and its source (git --exec-path, GSTACK_GIT_BASH)
  • GSTACK_GIT_BASH and a different GSTACK_BASH warn, naming both
  • the BASH_UNAVAILABLE refusal, and no row off Windows

Every assertion is unchanged: 13 expect calls before and after. No timeout was raised.

Checks: bun test test/gstack-doctor.test.ts (51 pass), the spawnSync-timeout tripwire, the module-size ratchet and typecheck:test. Repeated windows-free-tests runs on this branch are linked in the comments.

Open in Capy

…s per-test timeout

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

trunk-io Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 0/0 · behavior 0/0 · judge 0/0 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 0m00s · cost $0.00

0 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $0 rule/judge cost | reconcile exit: 0

Profile: pr / mode pr; selected behaviors: 0, judges: 0. Deferred to scheduled/release coverage: 0 behaviors and 0 changed prompt files. Deferred checks did not run and receive no PR-pass credit.

Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
Fail-closed reconciliation
[test:paid] report: 1/1 slices, 0 planned shards, tier=gate, attempt 1
[test:paid] coverage: profile=pr mode=pr; selected E2E=0, judges=0
[test:paid] deferred: 0 broad behaviors, 0 changed prompts without quick live coverage; these are not PR passes
[test:paid] collector final outcomes: 0 executed, 0 reused; 0 passed, 0 failed, 0 manual accepted (unscored; no score-cache credit) (0 attempt records from 0 collectors; every record counts)
[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 0/0 · behavior 0/0 · judge 0/0 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 0m00s · cost $0.00
[test:paid] report: every planned shard accounted and passed

Sliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry.

garrytan and others added 3 commits October 17, 2026 05:14
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>
@github-actions github-actions Bot changed the title test: split the doctor windows bash test so each case fits the Windows per-test timeout v1.91.120.0 test: split the doctor windows bash test so each case fits the Windows per-test timeout Oct 17, 2026
@capy-ai
capy-ai Bot merged commit eca247e into main Oct 17, 2026
55 checks passed
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