Repository navigation
[rushstack] Keep integration fixtures in project temp folders - #6185
Merged
Ian Clanton-Thuon (iclanton) merged 4 commits intoOct 30, 2026
Merged
Ian Clanton-Thuon (iclanton) merged 4 commits into
Ian Clanton-Thuon (iclanton) merged 4 commits into
Conversation
Check in immutable Git and daemon graph fixture inputs, copy them into isolated project-local workspaces, and let the Heft test clean phase remove retained outputs. Preserve daemon shutdown and child-process joins while removing teardown directory deletion that flakes on Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ian Clanton-Thuon (iclanton)
requested a review
from Pete Gonzalez (octogonz)
as a code owner
October 30, 2026 06:09
Ian Clanton-Thuon (iclanton)
enabled auto-merge (squash)
October 30, 2026 06:12
Use temp/sXXXXXX for the startup cases and clean only that generated workspace pattern. The longest staging socket in the Linux CI checkout now fits its 107-byte usable path limit, including maximum Linux PID digits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin immutable fixture text to LF so copied Git inputs keep the byte hashes that the tests assert. Keep the existing hash and cache-restoration assertions unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use node-core-library helpers for ordinary reads, writes, copies, path resolution, directory enumeration, and timestamps in the fixture cleanup. Preserve Buffer reads, strict file-deletion errors, and native APIs needed for temporary allocation, bigint stats, permissions, links, or native fs interception. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bharat Middha (bmiddha)
approved these changes
Oct 30, 2026
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.
Summary
Move the Git/index tests, shared daemon graph fixture, and detached-daemon startup tests into their owning projects'
tempdirectories. Check immutable starting repositories and scripts into source control instead of rebuilding their contents as strings in setup.Stop deleting these workspaces during test teardown. Preserve daemon shutdown, socket closure, cache disposal, and owned-process joins; let the Heft test phase's
--cleanstep delete the retained files.This follows #6174 and targets the recurring Windows
EBUSYdirectory-removal failure in the detached restart test, most recently in main run 40986415130.Details
package-deps-hash, plus the baseline three-project graph repository and build scripts for the sharedDaemonGraphTestFixture.temp/test. The startup suite uses the shortertemp/sXXXXXXlayout to fit Unix socket paths on CI. Unique case directories isolate simultaneous fixtures and preserve failed outputs for diagnosis. Dynamic setup remains only where necessary: the current Rush version, Git metadata/commits, installation state, and mutations exercised by tests.temp/testin the three affected projects, plus the exacttemp/s??????startup-workspace pattern, inheriting their existing rig configuration.node-core-librarydependency'sFileSystemfor standard reads/writes, copies, real paths, enumeration, and timestamps in the six touched test/helper files. Buffer reads and strict missing-file deletion errors are preserved. Native APIs remain only where needed for temporary allocation, bigint stats, exact mode/link/directory-removal semantics, or native filesystem interception tests.Fixture-local attributes pin text to LF, including on Windows checkout. The original graph
input.txtbytes intentionally have no final newline. Tests that verify cache restoration and file hashes remain unchanged.This is the agreed focused first cleanup, not a repository-wide rewrite. Other helpers and test files still use system temp paths; the production socket runtime-path logic is unchanged. File identity precision, graph admission timing, and the delayed-wire race are separate work (#6153 already covers the last of those).
No production behavior, dependencies, assertions about resource ownership, retry logic, or timeout budgets change here. #6183 separately scopes integration test budgets; this PR does not depend on it.
How it was tested
macOS, Node 24.22.2:
node common/scripts/install-run-rush.js build --only @rushstack/package-deps-hash --only @rushstack/rush-client-core --only @rushstack/rush-daemon --parallelism 2— package-deps-hash and daemon passed; client initially hit the 2,000-line lint ceiling. After keeping the test path constant at module scope, the client build and subsequent dependency-ordered build passed without warnings.libraries/package-deps-hash,rushx _phase:test— passed, 182 passed / 2 skipped. The new Heft test clean rule ran.libraries/rush-client-core,rushx _phase:buildandnode ../../apps/heft/lib-commonjs/start.js run --only test -- --test-path-pattern 'connectOrStartDaemon.test'— passed, 81 passed / 4 skipped.libraries/rush-daemon,rushx _phase:build— passed, including type-check, lint, asset copying, and API Extractor.libraries/rush-daemon,HOME="$PWD/temp/test-home" node ../../apps/heft/lib-commonjs/start.js run --only test -- --test-path-pattern 'DaemonGraphFixtureSetup|DaemonGraphFixturePaths|DaemonGraphRequestRouter|WorkspaceTransitionAdmission|WorkspaceWarmSet|NativeWorkspacePaths|WorkspaceWatchPolicy' --max-workers 2— passed, 65 tests across eight suites, including warm-set cache restoration and setup cancellation. The project-local home avoids the developer's Rush user.env. Nested fixture repositories produce informational phantom-node_modules notices from the owning project's node_modules; these do not fail the tests.node common/scripts/install-run-rush.js change --verify --target-branch microsoft/main --no-fetch— passed.After the
FileSystemmigration, the three dependency-ordered builds (including lint/type-check) and the same local suites were repeated successfully: 182 package tests, 81 startup tests, and 65 graph-consumer tests. The pre-commit formatter and change-file verification also passed.Windows validation on supported Node 24.22.1 completed on commit
3ce23ff961, before the subsequentFileSystem-only refactor:node common/scripts/install-run-rush.js build --only @rushstack/package-deps-hash --only @rushstack/rush-client-core --only @rushstack/rush-daemon --parallelism 2— passed.libraries/rush-client-core,node ../../apps/heft/lib-commonjs/start.js run --only test -- --clean --test-path-pattern connectOrStartDaemon.test --test-name-pattern 'retries only the typed pre-execution result'— passed, all four real restart variants.libraries/package-deps-hash,node ../../apps/heft/lib-commonjs/start.js run --only test -- --clean— passed, 163 passed / 13 skipped.libraries/rush-daemon,node ../../apps/heft/lib-commonjs/start.js run --only test -- --clean --test-path-pattern 'DaemonGraphFixtureSetup|DaemonGraphFixturePaths' --max-workers 1— passed, six tests.The initial Windows run exposed CRLF conversion of new text fixtures; fixture-local attributes fixed this without changing assertions. A local path-length assertion also verifies the listener's staging socket fits the Linux CI checkout with maximum Linux PID digits: 107 of 107 usable bytes.
The final
FileSystem-only refactor has local validation as recorded above; its Windows validation remains with CI. The full repository matrix was not run locally. A completed Node 26 Linux job at the preceding commit failed only in the known delayed-pong wire test covered by #6153, not in a changed fixture test.Impacted documentation
No website/API documentation changes. The test fixtures README documents immutable inputs, project-local workspace isolation, retained diagnostics, and Heft clean ownership. No-release change files are included for the three affected packages.