Skip to content

v0.8.8 — Windows CI SQLite Test Cleanup Fix

Choose a tag to compare

@hxx0611 hxx0611 released this 20 Aug 06:48
· 15 commits to main since this release

v0.8.8 — Windows CI SQLite Test Cleanup Fix

Fixed

  • Windows CI: SQLite temp test database could not be deleted (Phase 12A). rdap-link.test.ts failed on the windows-fresh-install (Node 24) job with EPERM / Permission denied / syscall: rm when the afterAll hook tried to remove its temporary directory.
  • Root cause: @/db opens a module-level SQLite connection (new Database(databaseUrl)) that lives for the whole process. The test's dynamic import of the domain repository triggered that connection, so at cleanup time a native file handle still held test.db. Linux allows unlinking an open file and silently masked the leak; Windows refuses to delete a file held open by a process.
  • Fix: src/db/index.ts now exports a test-lifecycle helper closeDb() (never called by production code); rdap-link.test.ts closes the connection before deleting the temp directory and uses rmSync({ recursive, force, maxRetries: 5, retryDelay: 100 }) as a residual native-lock fallback.

Notes

  • Test infrastructure / cross-platform compatibility fix only. This release does not change production database behavior, does not touch migrations or schema, and does not change RDAP business logic.
  • Windows Node 24 fresh-install CI passes with no EPERM; all four CI jobs pass with 813 tests / 55 files.