Skip to content

Fix hub SQLite cleanup on Windows#644

Merged
tiann merged 1 commit into
tiann:mainfrom
lekoOwO:fix/windows-sqlite-test-cleanup
May 18, 2026
Merged

Fix hub SQLite cleanup on Windows#644
tiann merged 1 commit into
tiann:mainfrom
lekoOwO:fix/windows-sqlite-test-cleanup

Conversation

@lekoOwO
Copy link
Copy Markdown
Contributor

@lekoOwO lekoOwO commented May 18, 2026

Summary

  • add an explicit Store.close() method for Bun SQLite-backed hub stores
  • close file-backed stores in migration and restart tests before deleting temporary directories
  • force a Windows GC cycle after close so unreachable prepared statements release SQLite WAL/SHM file handles before cleanup

Why

Windows refuses to remove a temporary directory while SQLite still has WAL/SHM handles open. The affected hub tests created file-backed stores and then deleted the temp directory without explicitly closing the database.

Validation

  • bun run test -- src/store/migration-v8.test.ts src/store/migration-v9.test.ts src/sync/messageService.test.ts in hub
  • bun run typecheck:hub

@lekoOwO lekoOwO marked this pull request as ready for review May 18, 2026 20:32
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings
No issues found.

Summary
Review mode: initial
No correctness, security, data loss, performance, or maintainability findings met the reporting threshold in the latest diff. Residual risk: I could not execute the Bun test suite in this runner because bun is not installed.

Testing
Not run: bun is not installed in this runner.

HAPI Bot

@tiann tiann merged commit 7cb8ccc into tiann:main May 18, 2026
3 checks passed
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.

2 participants