test(screenshot): raise file testTimeout to 15s to de-flake the vitest gate - #116
Merged
Conversation
…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
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.
This was referenced Jul 22, 2026
Merged
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.
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.
The new vitest CI gate flaked once on the #114 merge commit on main (
79c1267):screenshot.test.ts > preserves true color (24-bit) codestimed 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.