[PR #1152] [MERGED] fix(javascript): preserve graphs with async chunk self-references #2686

Closed
opened 2026-10-17 21:09:04 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1152
Author: @N0zoM1z0
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/javascript-bundler-self-reference


📝 Commits (1)

  • 8ab2be2 fix(javascript): preserve graphs with async chunk self-references

📊 Changes

3 files changed (+113 additions, -10 deletions)

View changed files

📝 src/application/javascript/JavaScriptArtifactGraphBuilder.ts (+5 -6)
📝 src/application/javascript/JavaScriptArtifactGraphBundlers.ts (+17 -4)
➕ tests/boundary/cli/javascriptBundlerSelfReferences.test.ts (+91 -0)

📄 Description

A Webpack or Rspack registration that requests one of its own chunk IDs produced a self-referential chunk edge, causing schema validation to discard the entire application analysis. Omit those unrepresentable edges and disclose their count in graph/result limitations. Preserve the original AST observations, source locations, module relationships, resolved sibling edges and unresolved references.

Fixes #1146

Validation:

  • Both new CLI regressions failed on the base; single-ID Webpack and merged-ID Rspack cases now pass.
  • npm run test:focused -- tests/boundary/cli/javascriptBundlerSelfReferences.test.ts tests/boundary/cli/javascriptSelfImportRelationships.test.ts tests/composition/javascript-applications/javascriptBundlerAdapters.test.ts tests/boundary/cli/javascriptApplicationJsonOutput.test.ts tests/boundary/cli/javascriptApplicationProgress.test.ts tests/boundary/filesystem/javascriptApplicationWorkflows.test.ts — 33 passed.
  • Built stdio MCP on the exact public one-file reproduction: valid graph, disclosed omission, all 138 tools discoverable, subsequent ping succeeds, no server stderr.
  • npm run build:cached, npm run check:fast, git diff --check — passed.

No tool-schema or inventory changes. No Hopper/Ghidra runtime changes or real-provider claims for this fix.


🔄 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/1152 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/javascript-bundler-self-reference` --- ### 📝 Commits (1) - [`8ab2be2`](https://github.com/morluto/rea/commit/8ab2be256e5f399fe75bdd97dd7b3094a090057f) fix(javascript): preserve graphs with async chunk self-references ### 📊 Changes **3 files changed** (+113 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/application/javascript/JavaScriptArtifactGraphBuilder.ts` (+5 -6) 📝 `src/application/javascript/JavaScriptArtifactGraphBundlers.ts` (+17 -4) ➕ `tests/boundary/cli/javascriptBundlerSelfReferences.test.ts` (+91 -0) </details> ### 📄 Description A Webpack or Rspack registration that requests one of its own chunk IDs produced a self-referential chunk edge, causing schema validation to discard the entire application analysis. Omit those unrepresentable edges and disclose their count in graph/result limitations. Preserve the original AST observations, source locations, module relationships, resolved sibling edges and unresolved references. Fixes #1146 Validation: - Both new CLI regressions failed on the base; single-ID Webpack and merged-ID Rspack cases now pass. - `npm run test:focused -- tests/boundary/cli/javascriptBundlerSelfReferences.test.ts tests/boundary/cli/javascriptSelfImportRelationships.test.ts tests/composition/javascript-applications/javascriptBundlerAdapters.test.ts tests/boundary/cli/javascriptApplicationJsonOutput.test.ts tests/boundary/cli/javascriptApplicationProgress.test.ts tests/boundary/filesystem/javascriptApplicationWorkflows.test.ts` — 33 passed. - Built stdio MCP on the exact public one-file reproduction: valid graph, disclosed omission, all 138 tools discoverable, subsequent ping succeeds, no server stderr. - `npm run build:cached`, `npm run check:fast`, `git diff --check` — passed. No tool-schema or inventory changes. No Hopper/Ghidra runtime changes or real-provider claims for this fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:09:04 +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#2686
No description provided.