Skip to content

Fix Windows test isolation and cleanup#3

Merged
brandonkramer merged 1 commit into
mainfrom
agent/windows-test-isolation
Jul 23, 2026
Merged

Fix Windows test isolation and cleanup#3
brandonkramer merged 1 commit into
mainfrom
agent/windows-test-isolation

Conversation

@brandonkramer

Copy link
Copy Markdown
Owner

Summary

  • isolate storage-backed tests with PI_SCRAPER_STORAGE_ROOT instead of HOME, including both tool-smoke suites
  • await closeStorageDbs() before deleting temporary roots and add missing closes in crawl/result tests
  • make the remaining path and permission assertions portable on Windows
  • scope download-test cleanup to its fixture directory
  • run the full test suite in the Windows CI job

Why

On Windows, node:os.homedir() ignores test-only HOME overrides, so smoke and storage tests could write under the real user profile. Several teardowns also started the asynchronous database close without awaiting it, then immediately deleted SQLite/WAL files, causing EBUSY failures.

Impact

Test storage is now isolated to per-test temporary roots, SQLite handles are closed before cleanup, and Windows CI covers the same full suite used on Linux. Production runtime behavior is unchanged.

Validation

  • bun run test on Windows: 105 files passed; 916 tests passed, 5 intentionally skipped
  • bun run typecheck
  • bun run lint (passes; existing warnings remain)
  • bun run format:check
  • bun run test:selection: 16/16
  • bun run test:tools: 7/7
  • bun run lint:workflows
  • git diff --check
  • read-only Cursor review; its one actionable cleanup-target finding was fixed before publication

@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@brandonkramer
brandonkramer merged commit 9385505 into main Jul 23, 2026
7 of 8 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.

1 participant