[GH-ISSUE #8126] [Bug] Reconciliation reports every V8 Inspector Node target as unmatched although its entry file is in the static layer #4681

Closed
opened 2026-10-31 00:52:25 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @Rinkia on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8126

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Evidence, artifacts, or reconstruction

Observed behavior

When I reconcile observe_javascript_runtime Evidence from a plain Node process with analyze_javascript_application Evidence for the same directory, the runtime target is classified as:

{"entity_kind": "target", "status": "unmatched", "basis": "none", "confidence": "unknown",
 "reason": "no-static-content-match", "candidate_static_count": 0}

The target's location is /tmp/jsapp/app.mjs. That path is under the analyzed root, so automatic file-root mapping applies. The static layer contains app.mjs as a javascript-asset. The runtime script for the same file matches it in the same result (unique-location-match). summary.unmatched is therefore 1 for every plain Node application.

The documentation says only a mapped location can be unmatched with no-static-content-match, which reads as an absence claim. Here the static counterpart exists.

The likely cause is in src/domain/javascript/javascriptRuntimeReconciliationRuntime.ts: the V8 target entity is built with staticKind: "renderer". candidateCategory in javascriptRuntimeStaticCandidates.ts only puts electron-renderer nodes in that category. A Node application has no renderer node, so the target has no candidate, while its mapped location makes the result unmatched rather than unknown.

Expected behavior

Either:

  • the Node target matches the entry asset at its mapped location, or
  • the target stays unknown with a reason saying that a Node target has no static renderer counterpart.

Today the result instead claims that a mapped location has no static match.

Reproduction

Container: Linux x64, Node 24.22.1. Seen on the 6.8.0 release and on main at 45cc93596. Both give the same classification.

  1. Create a directory /tmp/jsapp with app.mjs and a few lib/ modules (ESM and CJS). Start it with node --inspect=127.0.0.1:9229 app.mjs.
  2. Run rea list-javascript-runtime-targets http://127.0.0.1:9229 --format json and take the target ID.
  3. Run rea observe-javascript-runtime http://127.0.0.1:9229 <target_id> --observation-ms 8000 --format json > obs.json.
  4. Run rea analyze-javascript-application /tmp/jsapp --format json > an.json.
  5. Write rin.json as {"static_layers":[{"role":"application","analysis":<an.json>}],"runtime_observations":[<obs.json>]} and run rea reconcile-javascript-runtime rin.json --format json.
  6. In normalized_result.reconciliations, find the item with entity_kind: "target".

Additional context

The rest of the result was correct in my run:

  • All 7 application scripts matched their assets by unique location. These included lib/a.mjs?v=2, which folds into lib/a.mjs, and lib/hash%231.mjs, which maps to lib/hash#1.mjs.
  • 113 node: builtins stayed unknown (no-authorized-location-mapping).
  • Files that never loaded (a worker module, a module with a syntax error, an unused file) stayed unknown (static-or-runtime-coverage-incomplete) instead of not-observed-in-capture.

I did not test an Electron main process attached through --inspect, which is also a node target and probably takes the same path.

Originally created by @Rinkia on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/8126 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Evidence, artifacts, or reconstruction ### Observed behavior When I reconcile `observe_javascript_runtime` Evidence from a plain Node process with `analyze_javascript_application` Evidence for the same directory, the runtime **target** is classified as: ```json {"entity_kind": "target", "status": "unmatched", "basis": "none", "confidence": "unknown", "reason": "no-static-content-match", "candidate_static_count": 0} ``` The target's location is `/tmp/jsapp/app.mjs`. That path is under the analyzed root, so automatic file-root mapping applies. The static layer contains `app.mjs` as a `javascript-asset`. The runtime script for the same file matches it in the same result (`unique-location-match`). `summary.unmatched` is therefore 1 for every plain Node application. The documentation says only a mapped location can be `unmatched` with `no-static-content-match`, which reads as an absence claim. Here the static counterpart exists. The likely cause is in `src/domain/javascript/javascriptRuntimeReconciliationRuntime.ts`: the V8 target entity is built with `staticKind: "renderer"`. `candidateCategory` in `javascriptRuntimeStaticCandidates.ts` only puts `electron-renderer` nodes in that category. A Node application has no renderer node, so the target has no candidate, while its mapped location makes the result `unmatched` rather than `unknown`. ### Expected behavior Either: - the Node target matches the entry asset at its mapped location, or - the target stays `unknown` with a reason saying that a Node target has no static renderer counterpart. Today the result instead claims that a mapped location has no static match. ### Reproduction Container: Linux x64, Node 24.22.1. Seen on the 6.8.0 release and on `main` at `45cc93596`. Both give the same classification. 1. Create a directory `/tmp/jsapp` with `app.mjs` and a few `lib/` modules (ESM and CJS). Start it with `node --inspect=127.0.0.1:9229 app.mjs`. 2. Run `rea list-javascript-runtime-targets http://127.0.0.1:9229 --format json` and take the target ID. 3. Run `rea observe-javascript-runtime http://127.0.0.1:9229 <target_id> --observation-ms 8000 --format json > obs.json`. 4. Run `rea analyze-javascript-application /tmp/jsapp --format json > an.json`. 5. Write `rin.json` as `{"static_layers":[{"role":"application","analysis":<an.json>}],"runtime_observations":[<obs.json>]}` and run `rea reconcile-javascript-runtime rin.json --format json`. 6. In `normalized_result.reconciliations`, find the item with `entity_kind: "target"`. ### Additional context The rest of the result was correct in my run: - All 7 application scripts matched their assets by unique location. These included `lib/a.mjs?v=2`, which folds into `lib/a.mjs`, and `lib/hash%231.mjs`, which maps to `lib/hash#1.mjs`. - 113 `node:` builtins stayed `unknown` (`no-authorized-location-mapping`). - Files that never loaded (a worker module, a module with a syntax error, an unused file) stayed `unknown` (`static-or-runtime-coverage-incomplete`) instead of `not-observed-in-capture`. I did not test an Electron main process attached through `--inspect`, which is also a `node` target and probably takes the same path.
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#4681
No description provided.