Skip to content

fix(test): widen Windows cleanup retry window in citation-rule-self-heal - #205

Merged
kevintseng merged 1 commit into
mainfrom
fix/windows-heal-cleanup-race
Aug 24, 2026
Merged

fix(test): widen Windows cleanup retry window in citation-rule-self-heal#205
kevintseng merged 1 commit into
mainfrom
fix/windows-heal-cleanup-race

Conversation

@kevintseng

Copy link
Copy Markdown
Contributor

Summary

  • citation-rule-self-heal.test.ts's afterEach failed on windows-latest with ENOTEMPTY on rmSync, twice in the same CI run (PR fix: close the remaining 22 findings from tonight's full-codebase review ledger #203, both Node 22 and Node 24 legs) — the temp dir's OS-level handle from the child process runHook() spawns had not been released yet when cleanup ran.
  • This repo's usual maxRetries: 5, retryDelay: 100 (500ms worst case) was not always enough under CI load. Widened to 10/200 (2s worst case) for this file only — that cost is paid only on the runs that are already retrying.
  • Not applied to the ~106 other test files sharing the same 5/100 literal: this is the only file with observed CI failures, so the fix is scoped to it rather than applied speculatively everywhere.

Test plan

  • npx vitest run tests/hooks/citation-rule-self-heal.test.ts — 6 passed locally (macOS)
  • Windows CI on this PR — the actual verification ground, since the race does not reproduce on macOS/Linux

…lf-heal

Failed on windows-latest in PR #203's CI, twice, in the same run, both
Node 22 and Node 24 legs — always the same afterEach rmSync, always
ENOTEMPTY: the temp dir's handle from the child process runHook()
spawns had not been released by the OS yet. This repo's usual
maxRetries: 5, retryDelay: 100 (500ms worst case) was not enough on a
loaded runner; 10/200ms (2s worst case) only costs time on the runs
that are already retrying.

Scoped to this one file, not the ~106 other test files using the same
5/100 literal: this is the only one with observed CI failures.
@kevintseng
kevintseng merged commit 8f38b21 into main Aug 24, 2026
13 checks passed
@kevintseng
kevintseng deleted the fix/windows-heal-cleanup-race branch August 24, 2026 08:03
@kevintseng kevintseng mentioned this pull request Aug 24, 2026
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