Repository navigation
fix(javascript): retain distinct chunk registration callback metadata - #2737
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Really useful fix, @chqcjq: distinct Webpack/Rspack registration callbacks can carry different entry and async-chunk relationships even when their runtime, chunk IDs, and factory bytes match. Including the recovered callback facts in the shared identity keeps both observations in the graph. |
Fixes #2663.
Two literal Webpack/Rspack registrations with the same runtime, chunk IDs and factory bytes currently collapse even when their runtime callbacks name different entry modules or async chunks. The graph then loses the second callback's relationships. Include recovered callback metadata in the shared registration key used by both early collection and finalization: require name, cache status, entry/async keys and their unknown counts. Identical registrations still deduplicate; no downstream graph workaround or new schema is needed.
Regression coverage checks both source orders, standalone controls, identical repetitions, distinct chunk IDs, and differences in each callback field produced by the parser. Public compiled CLI and stdio MCP tests verify that both chunk observations retain their source locations and corresponding unresolved entry/async relationships. The analyzed fixtures are inert and never executed.
Validation on Windows x64 / Node 24.18.0:
npm run check:ci,npm run docs:check, andnpm run verify:test-discoverypass (1,046 files).Local diff and affected consumers were reviewed manually. Automated local Codex review could not start because the local config has an invalid
featuresvalue; no automated-review pass is claimed. No real bundler runtime or native provider was exercised, and no performance improvement is claimed.