Repository navigation
test: every test script preloads the shared scratch temp directory (#1030) - #1034
Merged
Merged
Conversation
…1030) The workspace package suites and the integration, proof, package, example and workerd scripts now preload test/scratch-tmpdir.ts with --import (packages as ../../test/scratch-tmpdir.ts, one shared copy), so none of them creates urlcode-* run directories in, or sweeps, the real temporary directory. The extension scaffold's test script does the same. hermetic-hardening.test.ts fails any test/test:* step in the root or a package manifest that does not. The disk-full harness keeps its own small filesystem (URLCODE_DISK_FULL_DIR). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1030
What changed
test/test:*script now preloadstest/scratch-tmpdir.tswith--import: the four workspace package suites (packages/{audit,auth,store,mcp}, as../../test/scratch-tmpdir.ts, the one shared copy),test:addons,test:proof,test:proof:authjs,test:ecosystem,test:multiprocess,test:disk-full,test:project,test:examples:built,test:package:builtandtest:workerd. Scripts that only chainnpm run build/npm run test:*inherit it through those.scripts/create-extension.tsscaffolds a package whosetestscript preloads it too (asserted intest/create-extension.test.ts, including that the path resolves from the generated package).test/hermetic-hardening.test.ts: every&&step of everytest/test:*script in the root and eachpackages/*/package.jsonis eithernpm run build,npm run test:*, or anodeprocess whose--importresolves to the roottest/scratch-tmpdir.ts. A new script that misses it failsnpm test.test/ci-workflow.test.tsandtest/workflows.test.tsupdated for the new script text; CONTRIBUTING's single-file example uses the same flags and explains the preload.URLCODE_DISK_FULL_DIR); only the OS temp directory moves.No package boundary change: packages reference the root file by path from a script only (no import), so
check-core-boundariesandcheck-workspace-linksare unaffected.Evidence (macOS, local)
npm run verify: green (includes every workspace package suite,test:addons, both proofs,test:ecosystem,test:multiprocess).npm run test:package,npm run test:examples:built,npm run test:project: green.npm run test:disk-fullagainst a 16 MiB HFS+ disk image: pass.urlcode-*entries in the real temp directory before and after all of the above: 0 new.test:workerd(optional workflow; needs workerd). Windows package legs run in this PR's CI because package manifests changed.🤖 Generated with Claude Code