Skip to content

test(hub-selection): raise windows-flaky beforeAll/test timeouts to 60s - #2507

Merged
carlos-alm merged 1 commit into
mainfrom
fix/issue-2368-hub-selection-windows-flaky
Aug 14, 2026
Merged

test(hub-selection): raise windows-flaky beforeAll/test timeouts to 60s#2507
carlos-alm merged 1 commit into
mainfrom
fix/issue-2368-hub-selection-windows-flaky

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Problem

tests/unit/hub-selection.test.ts has now hit the default 30s hook/test timeout on Test Node 22 (windows-2022) across multiple independent, otherwise-unrelated PRs this session (a docs-only README badge change, a lockfile-only chore, and two of my own earlier PRs in this /fixer run) — always the same two spots:

  • The beforeAll hook (fs.mkdtempSync + a fresh better-sqlite3 file + schema init).
  • The 'throws when the graph has no qualifying nodes with edges' test, which does its own separate mkdtempSync + DB file (unlike every other test in the file, which reuses the single DB beforeAll already built).

Every occurrence reran cleanly on retry — this is Windows-runner I/O slowness (the full Windows suite run is consistently ~470-500s, close to whatever margin exists before hitting the 30s per-hook/per-test ceiling), not a real regression in this file or whatever the triggering PR happened to touch.

Fix

Raised both to a 60s timeout via vitest's per-hook/per-test override — mirrors the identical fix already applied to a different Windows-flaky test in this repo (tests/unit/lint-skill-read-binding-2344.test.ts, PR #2490).

Did not pursue the issue's other two suggested options:

  • The I/O itself (mkdtempSync + a small sqlite init) isn't doing anything unusually slow — nothing to speed up algorithmically; the slowness is Windows-runner-environmental.
  • A "known-flaky" allowlist would still require someone to notice and rerun the failure each time — the timeout increase actually prevents the failure from happening in the first place.

Closes #2368

Test plan

  • vitest run tests/unit/hub-selection.test.ts — all 6 tests pass
  • Full vitest run suite (5283 passed, 328 files) after rebuilding the native addon (stale in the fresh worktree, unrelated to this test-only change)
  • tsc --noEmit, biome check clean

tests/unit/hub-selection.test.ts hit the default 30s hook/test timeout on
Test Node 22 (windows-2022) across multiple unrelated PRs this session,
always on slow tmpdir/DB-file I/O (mkdtempSync + a fresh better-sqlite3
file), never a real regression — both reruns passed cleanly. Mirrors the
same per-file timeout-override fix already applied to another
Windows-flaky test in this repo (PR #2490).

Closes #2368

docs check acknowledged
@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR raises two Windows-flaky timeout limits in the hub-selection unit tests from the configured 30 seconds to 60 seconds.

  • Adds a 60-second timeout to the shared beforeAll database setup.
  • Adds a 60-second timeout to the test that creates a separate temporary SQLite database.

Confidence Score: 5/5

The PR appears safe to merge because both timeout forms are supported and honored by the repository’s Vitest version.

The changes only extend timeout allowances for existing test setup and execution paths, with no accepted functional, security, or quality defects.

Important Files Changed

Filename Overview
tests/unit/hub-selection.test.ts Applies valid Vitest timeout overrides to two slow Windows CI paths without changing test behavior or production code.

Reviews (1): Last reviewed commit: "test(hub-selection): raise windows-flaky..." | Re-trigger Greptile

@carlos-alm
carlos-alm merged commit d242aa7 into main Aug 14, 2026
27 checks passed
@carlos-alm
carlos-alm deleted the fix/issue-2368-hub-selection-windows-flaky branch August 14, 2026 18:19
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky: tests/unit/hub-selection.test.ts times out on Windows CI runners

1 participant