Repository navigation
fix: preserve runtime module dependency safety - #32
Merged
adityankale190895 merged 1 commit intoOct 22, 2026
Merged
Conversation
FredApps
marked this pull request as ready for review
October 10, 2026 11:50
This was referenced Oct 23, 2026
Merged
Member
This was referenced Oct 26, 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
Prevent a missing runtime dependency edge from becoming an empty successful selective plan.
import(...)andrequire(...)arguments as unresolved runtime dependencies instead of external package names or omitted references.import = require(...)declarations, including type-only declarations.Reproduction and tests
Synthetic repositories contain a changed module, a loader, an importing test, and an unrelated test. Before the fix, variable/conditional imports and computed require calls return COMPLETE with no selected tests. Interpolated imports return UNSAFE initially, then refinement incorrectly returns COMPLETE for a changed possible target. Import-equals declarations omit their dependency edge.
Nine module-reference regressions fail against the original code and pass with the fix. A separate warm-cache regression fails before the schema bump and passes afterward.
Validated on Node v24.19.0, Linux, from baseline
9d575cef7b1dd118300cd6298c9f85a8c1a44ad8:npm ci --ignore-scripts --cache /tmp/diffci-npm-cachenpm run typechecknpm run buildnpm run audit:boundarynode --import tsx --test --test-concurrency=1 $(find tests -name '*.test.ts' | sort)— 343/343 passedgit diff --checkThe unmodified baseline passes 333/333 tests serially. Its default parallel
npm testrun lost two suite processes in this environment without assertion details, so the full suite was validated serially. Windows and Node 22 execution remain for CI.Scope and cache coordination
Computed module expressions intentionally require full validation; this does not evaluate expressions or model arbitrary custom loaders. Commands remain advisory.
Other independent safety PRs from this review also change graph construction and bump cache schema 2 to 3. If merged/released separately, advance the schema again (or otherwise invalidate intermediate-version graphs) for each subsequent analysis change. Do not retain warmed graphs from an earlier subset of the fixes.