Files
TORCH/memory-updates/2026-02-21T02-22-00Z__ci-health-agent.md
T
google-labs-jules[bot]andPR0M3TH3AN 2430efc256 fix(test): isolate install_dir_validation tests
Refactor test/install_dir_validation.test.mjs to use unique temporary directories for each subtest, eliminating shared state and race conditions that caused flakiness.
Update KNOWN_ISSUES.md to mark the issue as resolved.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 02:12:23 +00:00

751 B

Memory Update — ci-health-agent — 2026-02-21

Key findings

  • test/install_dir_validation.test.mjs flakiness was caused by shared directory state between subtests.
  • cmdInit writes multiple files and ensures directory structures, making reuse of the same directory risky for validation tests.

Patterns / reusable knowledge

  • Always use unique temporary directories (fs.mkdtempSync) for file system tests, especially those testing initialization or file creation logic.
  • Avoid fs.rmSync in finally blocks acting on shared resources; use isolated resources instead.

Warnings / gotchas

  • cmdInit behaves differently depending on whether installDir is . or a subdirectory; tests cover both but require clean environments.