[PR #2737] [MERGED] fix(javascript): retain distinct chunk registration callback metadata #5352

Closed
opened 2026-10-31 01:05:58 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2737
Author: @chqcjq
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/bundler-registration-callback-identity


📝 Commits (1)

  • fc3a256 fix(javascript): retain distinct chunk registration callback metadata

📊 Changes

3 files changed (+147 additions, -0 deletions)

View changed files

➕ src/domain/javascript/javascriptBundlerRegistrationIdentity.test.ts (+78 -0)
📝 src/domain/javascript/javascriptStaticAnalysisHelpers.ts (+8 -0)
➕ tests/acceptance/applications/bundlerCallbackMetadataCli.test.ts (+61 -0)

📄 Description

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:

  • Before: 9 new regressions fail; the distinct-chunk-ID control passes.
  • After: all 10 targeted tests pass, including CLI/MCP; all 1,186 JavaScript domain tests pass.
  • npm run check:ci, npm run docs:check, and npm run verify:test-discovery pass (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 features value; no automated-review pass is claimed. No real bundler runtime or native provider was exercised, and no performance improvement is claimed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2737 **Author:** [@chqcjq](https://github.com/chqcjq) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/bundler-registration-callback-identity` --- ### 📝 Commits (1) - [`fc3a256`](https://github.com/morluto/rea/commit/fc3a25660bb5308260f0700e31d7c3266aaf06f0) fix(javascript): retain distinct chunk registration callback metadata ### 📊 Changes **3 files changed** (+147 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `src/domain/javascript/javascriptBundlerRegistrationIdentity.test.ts` (+78 -0) 📝 `src/domain/javascript/javascriptStaticAnalysisHelpers.ts` (+8 -0) ➕ `tests/acceptance/applications/bundlerCallbackMetadataCli.test.ts` (+61 -0) </details> ### 📄 Description 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: - Before: 9 new regressions fail; the distinct-chunk-ID control passes. - After: all 10 targeted tests pass, including CLI/MCP; all 1,186 JavaScript domain tests pass. - `npm run check:ci`, `npm run docs:check`, and `npm run verify:test-discovery` pass (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 `features` value; no automated-review pass is claimed. No real bundler runtime or native provider was exercised, and no performance improvement is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:05:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5352
No description provided.