Skip to content

test(cli): createTestStorage no longer leaks SQUIRREL_CONTENT_STORE_PATH #1322 - #1323

Closed
nc9 wants to merge 1 commit into
mainfrom
fix/test-isolation-content-store-env
Closed

nc9 wants to merge 1 commit into
mainfrom
fix/test-isolation-content-store-env

Conversation

@nc9

@nc9 nc9 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #1322

createTestStorage() now builds its own ContentStore on a temp file instead of writing SQUIRREL_CONTENT_STORE_PATH into process.env and leaving it there. The store-scripts e2e also removes the variable from the environment it passes to the spawned CLI, so a stray value cannot move the child's content store.

Proof: bun test tests/crawler/max-depth.test.ts tests/audit/store-scripts-1255.test.ts failed the store-scripts test on main and passes now (13 pass). The other six createTestStorage files (crawl-loop-concurrency, parallel-crawl, per-host-throttle, sitemap-all-filtered, storage-parsed-data, streaming-frontier) and content-store.test.ts pass. apps/cli format, lint, tsgo clean.

Note for #1310: apps/cli/tests/audit/store-scripts-results-1280.test.ts spawns the CLI the same way (...process.env); on merge give it the same SQUIRREL_CONTENT_STORE_PATH: undefined. Test-only change, no CHANGELOG entry. Skill: no change needed.

… leaks SQUIRREL_CONTENT_STORE_PATH #1322

Signed-off-by: Nik Cubrilovic <[email protected]>
nc9 added a commit that referenced this pull request Oct 30, 2026
…E_PATH (compose note of #1310, as in #1323)

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9

nc9 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@nc9 nc9 closed this Oct 30, 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.

tests: createTestStorage leaks SQUIRREL_CONTENT_STORE_PATH into later test files and breaks the store-scripts e2e

1 participant