You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flaky: tests/unit/hub-selection.test.ts times out on Windows CI runners #2368
tests/unit/hub-selection.test.ts has hit a 30000ms timeout on the Test Node 22 (windows-2022) CI job twice in consecutive, otherwise-unrelated PRs during this /fixer batch run:
PR chore: sync Cargo.lock codegraph-core version to 3.16.0 #2367 (one-line Cargo.lock version sync): a specific test — selectHubTargets > throws when the graph has no qualifying nodes with edges — timed out at tests/unit/hub-selection.test.ts:129:3.
Both PRs' changes are structurally incapable of affecting this test file's behavior (a Markdown badge edit and a lockfile-only chore), and both reruns passed cleanly on retry — strongly indicating Windows-runner-specific flakiness (slow tmpdir I/O, antivirus scanning overhead, or similar), not a real regression. The overall Windows test run duration in both cases was ~485-495s, close to whatever margin exists before hitting the default 30s per-test/per-hook timeout.
Fix direction
Options to evaluate:
Increase this file's beforeAll/test timeout via a per-file { timeout: ... } override (matching how other Windows-sensitive tests in this repo already handle slow I/O — check for precedent).
Investigate whether tests/unit/hub-selection.test.ts's beforeAll does something Windows-specifically slow (temp directory creation via fs.mkdtempSync, DB file creation) that could be sped up.
If neither is tractable, add this test file to a documented "known-flaky on windows-2022" allowlist so future /fixer or CI runs don't need to independently rediscover and rerun it.
Filed since two independent, otherwise-clean PRs in the same session hit this — not something either of those PRs' own diffs could have caused.
Third occurrence — PR #2379 (docs-only change to CLAUDE.md's Parallel Sessions section, no code/test files in the diff). Same test, same line, same failure mode:
FAIL tests/unit/hub-selection.test.ts > selectHubTargets > throws when the graph has no qualifying nodes with edges
Error: Test timed out in 30000ms.
❯ tests/unit/hub-selection.test.ts:129:3
Run: https://github.com/optave/ops-codegraph-tool/actions/runs/31303329326/job/93220684433 (Test Node 22, windows-2022). Total Windows run duration was 467.27s, and several other tests in the same run's tracer-validation.test.ts came within ~20ms of their own 60s timeouts (60020ms), same pattern as the prior two occurrences — the whole runner was under heavy contention, not this test's own logic being slow (it's a fully synchronous better-sqlite3 query against an empty on-disk DB). Re-running the job to confirm; will report back. Three occurrences in as many days on unrelated PRs seems worth prioritizing the beforeAll/per-test timeout bump mentioned in the fix direction above.
Confirmed — rerun of just the failed job (gh run rerun --failed) passed cleanly: Test Node 22 (windows-2022) completed in 16m23s with all 4778 tests passing. Same pattern as the first two occurrences. PR #2379 is otherwise unaffected and CI is now fully green.
Activity
carlos-alm commentedon Aug 9, 2026
Third occurrence — PR #2379 (docs-only change to CLAUDE.md's Parallel Sessions section, no code/test files in the diff). Same test, same line, same failure mode:
Run: https://github.com/optave/ops-codegraph-tool/actions/runs/31303329326/job/93220684433 (Test Node 22, windows-2022). Total Windows run duration was 467.27s, and several other tests in the same run's
tracer-validation.test.tscame within ~20ms of their own 60s timeouts (60020ms), same pattern as the prior two occurrences — the whole runner was under heavy contention, not this test's own logic being slow (it's a fully synchronousbetter-sqlite3query against an empty on-disk DB). Re-running the job to confirm; will report back. Three occurrences in as many days on unrelated PRs seems worth prioritizing thebeforeAll/per-test timeout bump mentioned in the fix direction above.carlos-alm commentedon Aug 9, 2026
Confirmed — rerun of just the failed job (
gh run rerun --failed) passed cleanly:Test Node 22 (windows-2022)completed in 16m23s with all 4778 tests passing. Same pattern as the first two occurrences. PR #2379 is otherwise unaffected and CI is now fully green.test(hub-selection): raise windows-flaky beforeAll/test timeouts to 6…
fix: reuse native pts maps instead of solving three times per build