Skip to content

test(screenshot): raise file testTimeout to 15s to de-flake the vitest gate - #116

Merged
myobie merged 1 commit into
mainfrom
ci/harden-screenshot-timeout
Jul 21, 2026
Merged

test(screenshot): raise file testTimeout to 15s to de-flake the vitest gate#116
myobie merged 1 commit into
mainfrom
ci/harden-screenshot-timeout

Conversation

@myobie

@myobie myobie commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

The new vitest CI gate flaked once on the #114 merge commit on main (79c1267): screenshot.test.ts > preserves true color (24-bit) codes timed out at the default 5000ms under CI load (retried 3×, all timed out; it passed on a re-run, and current main is green).

Every test in this file spawns a real pty session and polls the rendered screen (createSession + waitForText), so the default 5s is too tight on a loaded CI runner — and the true-color test just happened to be the one that tipped over; its siblings still on the default were equally at risk.

Fix: vi.setConfig({ testTimeout: 15000 }) at the top of the file — raises the whole file to the 15000ms already used by its known-slower tests (a per-test timeout arg still overrides it). No runtime cost for passing tests (timeout is a ceiling). Local: 41/41 pass, typecheck clean.

A flaky required gate false-reds future PRs and erodes trust in the gate, so worth hardening even at low-pri.

…t gate

The vitest CI gate flaked once on main (#114 merge, 79c1267): screenshot.test.ts
'preserves true color (24-bit) codes' timed out at the default 5000ms under CI
load (it passed on re-run). Every test in this file spawns a real pty session
and polls the rendered screen (createSession + waitForText), so 5s is too tight
on a loaded runner — and the siblings still on the default were equally at risk.
Raise the whole file to 15000ms (matching this file's existing explicit
timeouts) so a loaded runner can't false-red a real-pty screenshot test. A flaky
required gate false-reds future PRs and erodes trust in the gate.
@myobie
myobie merged commit d5ccbdb into main Jul 21, 2026
2 checks passed
@myobie
myobie deleted the ci/harden-screenshot-timeout branch July 21, 2026 11:03
myobie added a commit that referenced this pull request Jul 22, 2026
…ke render tests

The vitest gate flaked a 2nd time — screenshot.test.ts "preserves 256-color
codes" timed out after 5000ms waiting for ORANGE. #116 raised VITEST's
testTimeout (15000ms), but the real 5000ms is waitForText's OWN internal poll
timeout (src/testing/session.ts), which #116 never touched — so terminal render
under CI load still tripped it. Raise the waitForText/waitForAbsent/waitFor
default to 10000ms, matching the explicit 10000-15000ms render-heavy tests
already pass (scrollback-fidelity.test.ts) and staying under screenshot's
15000ms vitest testTimeout. Only affects failure/slow-wait latency; a matching
wait returns immediately.

Folded into this PR so it fixes BOTH required-gate flakes (parity teardown
ENOTEMPTY + screenshot render timeout) and one CI run validates both.
myobie added a commit that referenced this pull request Jul 22, 2026
…ke render tests (#120)

The vitest gate flaked a 2nd time — screenshot.test.ts "preserves 256-color
codes" timed out after 5000ms waiting for ORANGE. #116 raised VITEST's
testTimeout (15000ms), but the real 5000ms is waitForText's OWN internal poll
timeout (src/testing/session.ts), which #116 never touched — so terminal render
under CI load still tripped it. Raise the waitForText/waitForAbsent/waitFor
default to 10000ms, matching the explicit 10000-15000ms render-heavy tests
already pass (scrollback-fidelity.test.ts) and staying under screenshot's
15000ms vitest testTimeout. Only affects failure/slow-wait latency; a matching
wait returns immediately.

Folded into this PR so it fixes BOTH required-gate flakes (parity teardown
ENOTEMPTY + screenshot render timeout) and one CI run validates both.
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