Repository navigation
fix(ci): isolate dependency diagnostic installations - #4038
Merged
Merged
Conversation
This was referenced Nov 15, 2026
Merged
Merged
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.
Closes #1980
What changed
Dependency diagnostics now have a preparation command that refuses an existing installation, installs the unchanged lock through a fresh private cache with independent file copies, and cleans up only that cache. Contributor, experiment-tier and native-qualification recovery guidance use it. The guide preserves the reported modified/registry chunk, integrity and inode evidence with its historical limits.
Why this shape
A separate worktree and frozen lock do not isolate Bun hardlinks or establish installed-byte provenance. Copyfile from a modified cache preserves modified bytes. The command sets both the cache environment variable and flag because the inherited environment can override the flag. This is scoped repository tooling; package versions, locks, qualification pins, product behavior and offline gates are unchanged. No consumer-visible changeset is needed.
Proof
BUN_INSTALL_CACHE_DIRfrom preparation fails the fresh-download assertion indiagnostic installs avoid modified cache bytes and isolate diagnostic edits. Restoring it passes. This reproduces the missing cache isolation of the earlier flag-only recovery under an inherited cache environment.falsefails the same named test atassert.equal(refusedExit, 1)(actual 0); restoring it passes. The initial synchronous mutation probe deadlocked its loopback server and timed out; that is not claimed as mutation proof. The fixture now awaits the installer asynchronously and the receipt above fails on the intended assertion.bun run test ./tests/diagnostic-install.test.ts ./tests/experiment-tier.test.ts ./tests/native-diagram-inputs.test.ts: 30 pass, 0 fail, 63,051 expectations. Frozen native qualification passes without changing its pins.NODE_OPTIONS=--max-old-space-size=8192 bun run typecheck: passed. The initial default-heap run exhausted Node's 2 GiB heap; no source errors were reported.sh -n scripts/prepare-diagnostic-install.shandgit diff --check: passed.{"version":1,"kind":"brain-check-pr-receipt","head":"1727dc77d5d70aa5ccc56759d14cc67dec205ce9","base":"origin/main","mode":"focused","startedAt":"2026-11-15T19:53:24.365Z","finishedAt":"2026-11-15T19:55:00.160Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":21475.891261},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":124.6983880000007},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":114.79039100000227},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":17.4739840000002},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":74041.653573}]}Guard containment
Only preparation with an existing
node_modulestriggers the new refusal; it does not assert unknown bytes are clean or restrict other worktrees. In-place reuse cannot establish pristine inputs, so a restricted reuse mode would be misleading. The owner preserves evidence and moves aside only the owned installation, after which preparation proceeds automatically; no credential or human-only action is required. The cause and recovery are printed to stderr for the command receipt, and documented in the diagnostic guide. The fixture refuses one installation while preserving the independent second installation and shared fixture cache. Install failures propagate their exit code and remove only the invocation's cache.Checklist
Collision check
bun scripts/collisions.ts --json --pr 4038at head1727dc77d5d70aa5ccc56759d14cc67dec205ce9: graph built at1727dc77d5d70aa5ccc56759d14cc67dec205ce9.Shared proof closures are detection, not ownership. No competing implementation of #1980 was found. The orchestrator should reconcile overlapping paths if those candidates land first.
Anything left open
Hosted confirmation and landing are owned by the orchestrator. No follow-up issues filed; no historical browser/provider suite is requalified by this fixture.