Skip to content

fix(javascript): reconcile Node targets with entry assets - #8155

Closed
ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-node-target-reconciliation
Closed

ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-node-target-reconciliation

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #8252 at the author's request: #8252 . The replacement uses the same verified head commit; this PR retains the original discussion and validation record.

Summary

Fixes #8126. A V8 Inspector target with protocol type node and a mapped entry-file location was searched only against renderer candidates. Reconciliation therefore returned unmatched/no-static-content-match even when the JavaScript asset existed. Use the existing JavaScript candidate category for that target and retain a medium-confidence location correspondence.

Change and scope

The runtime projection owns the candidate category. Browser/Electron page targets keep their renderer category; unresolved locations still remain unknown. The load-state consumer now accepts only script reconciliation items as evidence of loaded code: matching a target entry location alone must not claim script presence or execution. Owning documentation records this distinction.

This is a read-only correction within existing saved-Evidence reconciliation. No new provider, runtime role authentication, public schema, target selection, process authority, capture behavior, installation or resource limit is introduced. A new maintainer capability decision is not applicable. Original Evidence and inferred observed_as provenance remain separate.

Expected effects:

  • Read existing files or captured data.

Evidence and regression coverage

Pinned base: 675d4076de1af5052f01709a9cf4cdf0cc3e2c67. Windows, Node 24.22.1 / npm 11.16.0.

  • New production-boundary regressions on that base: 2 failed / 0 passed, reporting unmatched instead of a unique location match.
  • New real compiled CLI/stdio MCP cases with those same synthetic Evidence contracts on the base: 2 failed / 0 passed. Both adapters exposed the wrong classification.
  • Fixed four complete files: 10/10 passed (new Node boundary 2, existing unresolved-target control 1, existing ambiguity/verifier/source-approval controls 5, compiled CLI/stdio MCP 2). Three build prerequisite tasks passed. Target-only matching retains runtime_scripts: 0, static_loaded: 0; an observed script still establishes loaded presence.
  • Expanded five-file reconciliation selection: 29 passed / 12 skipped / 1 failed. The failure is an unchanged selected-paths fixture's Windows symlink EPERM, before reconciliation executes. Temporarily restoring both changed production owners to exact main reproduces that same failure; both files were restored byte-for-byte afterward. No skip or assertion was changed. This is not a fully green local suite.
  • check:fast: typecheck/lint 2/2 passed (31.53 seconds). Test discovery: all 2,881 files discovered exactly once. Documentation fact check passed. Normal precommit passed, with all six committed files identical to tested bytes; normal prepush 2/2 passed (cached 215 ms).

The matching regressions use explicitly synthetic, schema-validated Evidence. A separate real owned Node Inspector + CLI probe on Windows completed listing, observation, static analysis and reconciliation, but its lossy discovery URL correctly stayed unresolved/unknown; it does not establish a real Linux reproduction. The test process was stopped afterward. No Linux/macOS or real Electron run is claimed. The existing full Inspector observation file also had two Windows-specific expectations fail on the baseline; that file is unchanged. Hosted CI must independently validate this new head.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-30T17:05:34.111305Z
We couldn’t complete this review. Comment @codex review to try again.
e56bcc9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; entry matching stays separate from evidence that code loaded.

Summary

Fixes saved-Evidence reconciliation so V8 Inspector node targets can match JavaScript entry assets instead of renderer candidates.

  • Node Inspector targets can match their JavaScript entry assets.

Validation was source-based; tests were not run during this review. Whether another PR supersedes this one could not be checked because GitHub access required authentication.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[V8 Inspector target] --> B{Protocol type is node?}
  B -->|Yes| C[JavaScript candidates]
  B -->|No| D[Renderer candidates]
  C --> E{Location resolves uniquely?}
  E -->|Yes| F[Medium-confidence inferred match]
  E -->|No| G[Unknown, unmatched, or ambiguous]
  F --> H[Target match does not prove loaded code]
  I[Observed script match] --> J[Loaded code]
Loading

Reviews (1) · Last reviewed commit: "fix(javascript): reconcile Node targets ..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Reconciliation reports every V8 Inspector Node target as unmatched although its entry file is in the static layer

2 participants