Skip to content

Give the clone, push, and pull tests room on the windows runner (windows-portability.md §7.2) - #220

Merged
ninjudd merged 1 commit into
mainfrom
windows/remote-test-timeouts
Oct 12, 2026
Merged

ninjudd merged 1 commit into
mainfrom
windows/remote-test-timeouts

Conversation

@ninjudd

@ninjudd ninjudd commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

The windows CI job still fails every few runs after #197, on main and on branches alike, and every failure since is a vitest timeout in src/commands/clone.test.ts, push.test.ts, or pull.test.ts. Each test in those files sets up a project, a commit, and a bare remote, one git or git-lfs process after another, and several then clone, push, or pull. Starting a process is slow on the Windows runner, so on a run that passes vitest reports 3 to 7 s for one of these tests, setup included, against its 5 s test default and 10 s hook default. A process-start stall then tips one over. #197 gave clone.test.ts's beforeEach 30 s for this reason, but left the test bodies and the other two files at the defaults.

These are the six windows runs that timed out this way on 2026-10-11:

These read as slow runs rather than hangs. Vitest can fire a timeout only when the event loop is free, and these tests spend long stretches in synchronous git calls. So a test reported well past its limit, such as the 14.2 s push on #219, was still making progress until the timer fired. On that run the whole push file took 33 s against 17.6 s on main's passing run, so the runner was slow across the board.

All three files now give their beforeEach and every test in their describe 30 s, through one GIT_HEAVY_MS constant per file, as release.test.ts gives its git-heavy tests. clone.test.ts's SETUP_TIMEOUT_MS becomes that constant. 30 s is twice the slowest timed-out test, so a timeout there now means a stall twice as long as any seen, or a real hang. This differs from the "runner stalls" #197 left alone in project.test.ts and live-session.test.ts, whose hooks are cheap and stalled once or twice. These tests use most of their budget on runs where nothing stalls. Raising vitest's testTimeout for the whole suite would also stop these failures, but it would hide real hangs everywhere else. The Windows plan records the item in §7.2 as done. The change touches tests and the plan, and no product code.

Testing

From the root of a checkout of windows/remote-test-timeouts, after pnpm install --frozen-lockfile. These three files need no native build.

pnpm typecheck
pnpm exec vitest run src/commands/clone.test.ts src/commands/push.test.ts src/commands/pull.test.ts
project check

You should see tsc --noEmit print nothing, then Test Files 3 passed (3) and Tests 22 passed (22), then "Project plans are valid." On macOS these tests pass with or without this change, so this only shows nothing broke.

To see that the budget reaches both the hooks and the tests, shrink it and watch the timeout messages name the new value:

sed -i '' 's/^const GIT_HEAVY_MS = 30_000;$/const GIT_HEAVY_MS = 100;/' src/commands/{clone,push,pull}.test.ts
pnpm exec vitest run src/commands/clone.test.ts src/commands/push.test.ts src/commands/pull.test.ts 2>&1 | grep -oE '(Test|Hook) timed out in [0-9]+ms' | sort | uniq -c
git checkout -- src/commands
sed -i '' 's/{ timeout: GIT_HEAVY_MS }/{ timeout: 100 }/' src/commands/{clone,push,pull}.test.ts
pnpm exec vitest run src/commands/clone.test.ts src/commands/push.test.ts src/commands/pull.test.ts 2>&1 | grep -oE '(Test|Hook) timed out in [0-9]+ms|Tests +[0-9].*' | sort | uniq -c
git checkout -- src/commands

The first run should report only Hook timed out in 100ms, because every setup hook now fails first. The second should report Test timed out in 100ms and Tests 9 failed | 13 passed (22), beside the tail of vitest's Failed Tests 9 banner: the nine tests that wait on a real clone, push, or pull time out, and the rest finish synchronously. A 5000ms or 10000ms in either run means a hook or test still runs on vitest's default, and the change is wrong. The sed -i '' form is BSD sed, as on macOS. Each git checkout -- src/commands puts the files back, and the tests remove their own temp projects, so nothing is left behind.

The real check is this pull request's windows CI job, which cannot run by hand here. Its pnpm test step should pass all three files. A Test timed out in 5000ms or Hook timed out in 10000ms naming clone.test.ts, push.test.ts, or pull.test.ts means the change is wrong. A 30000ms timeout there would be a new finding: a stall longer than 30 s, or a hang. One green run proves little against a failure that came every few runs, so the evidence builds over the next runs on main.

📽️ Projector summary of 205b0ca: https://field.amnes.ac/reviews/220

…ows-portability.md §7.2)

Every test in clone.test.ts, push.test.ts, and pull.test.ts sets up a
project, a commit, and a bare remote with one git or git-lfs process
after another, and several then clone, push, or pull. On the windows
runner one of those tests takes 3 to 7 s on a passing run, against
vitest's 5 s test and 10 s hook defaults, so a process-start stall there
times one out every few runs. #197 gave only clone.test.ts's hook 30 s.
All three files now give their hook and every test 30 s, as
release.test.ts gives its git-heavy tests.

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📽️ Projector review of 205b0ca · 0.7.10 · model gpt-6 · CLEAN · took 2m 13s

This change gives the clone, push, and pull integration tests enough time for real Git and Git LFS processes on a slow Windows runner. Their setup hooks and test bodies now share a 30-second budget, and the Windows portability inventory records the follow-up. Product code and suite-wide defaults are unchanged.

0 finding threads: 0 resolved, 0 open

Covered 4 of 4 changed files; 0 generated files skipped.

Windows execution was not available locally; the focused checks ran on macOS. The new budget addresses the documented stalls, but repeated Windows CI runs are needed to measure the reduction in intermittent failures.

Checked:

  • The explicit setup timeout and inherited suite test timeout cover all 22 tests across the three files.
  • The comments explain the platform constraint, and the plan accurately records the scoped change without changing readiness.
  • pnpm exec vitest run src/commands/clone.test.ts src/commands/push.test.ts src/commands/pull.test.ts: 3 files and 22 tests passed.
  • pnpm typecheck and project check: passed.

@ninjudd
ninjudd merged commit 4bc73bd into main Oct 12, 2026
7 checks passed
@ninjudd
ninjudd deleted the windows/remote-test-timeouts branch October 12, 2026 01:17

This branch was previously deployed

1 inactive deployment
github-pages — 205b0caa Deployed Oct 12, 2026 by ninjudd via publish #175
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