Skip to content

fix(javascript): remove duplicate childNodes import - #8886

Merged
morluto merged 3 commits into
mainfrom
cursor/remove-duplicate-childnodes-import-ae6a
Nov 4, 2026
Merged

morluto merged 3 commits into
mainfrom
cursor/remove-duplicate-childnodes-import-ae6a

Conversation

@morluto

@morluto morluto commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

src/domain/javascript/electronCallPathBlockPrefixes.ts imported childNodes twice, so typecheck failed with TS2300 and main's static checks failed. This PR keeps one import.

CI on that commit also failed two tests whose assertions still described behavior replaced by other merges already on main. Those assertions now follow the current contracts.

Problem and expected behavior

Maintainer commit afc18131f added import { childNodes } from "./javascriptSemanticTraversal.js";. Squash-merged #7967 added the same import again, with a blank line between the two. TypeScript reports Duplicate identifier 'childNodes'. The module should import childNodes once and typecheck.

Two later CI failures were the same kind of merge drift:

  • GdbSessionManagerCoverage still expected the old sentence 16777216 byte or 16384 record cap. This release has no runtime override. The session now reports the command-output cap and debuggerAdmissionRecovery.
  • defaultAmpRegistration still treated mcp add --command --agent ... as a successful non-Amp selection. mcp add now rejects a flag in the --command or -c value position before it touches Amp settings.

Change and scope

Removed the duplicate import and the blank line the squash inserted, leaving the import next to import * as t from "@babel/types";, which matches the file before the squash and the formatter (sortImports is off).

A scan of top-level bindings in files changed on main today found no other new duplicate import or duplicate declaration of this kind.

The GDB coverage assertion now expects the limitation built from DEFAULT_DEBUGGER_MAX_COMMAND_OUTPUT_BYTES_LIMIT and debuggerAdmissionRecovery. The Amp registration test still checks that valid non-Amp selections leave broken settings untouched, and it now expects the two flag-as-value invocations to exit 1 with Missing value for flag: without writing settings or invoking the runner.

Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.

Contract and boundary impact

  • Semantic owner and earliest changed stage: electronCallPathBlockPrefixes.ts already owned the childNodes import from javascriptSemanticTraversal.ts. Consumers are unchanged. GDB limitation text stays owned by gdbRetainedOutputLimitation and debuggerAdmissionRecovery. mcp add value rejection stays owned by the CLI pre-check in src/cli.ts. Tests are the only consumers updated.
  • Contribution scope fit and linked maintainer decision: ordinary fixes inside existing JavaScript, GDB, and CLI boundaries. Not applicable.
  • CLI and MCP/tool-catalog contract: no catalog change. The test now records the existing mcp add rejection of a flag used as a command value.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: the GDB test now expects the limitation text the session already emits. No producer change.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

No target interaction. Production behavior is unchanged. The diff removes a duplicate import and updates two tests to the contracts already on main.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/providers/GdbSessionManagerCoverage.test.ts and tests/boundary/cli/defaultAmpRegistration.test.ts. No new test file. electronCallPathBlockPrefixes.test.ts already covers that module.
  • Base reproduction or other evidence: on current main, lines 2 and 4 of src/domain/javascript/electronCallPathBlockPrefixes.ts were the same childNodes import. CI on 25e847275 then failed tests/boundary/providers/GdbSessionManagerCoverage.test.ts (toContain the old cap sentence) and tests/boundary/cli/defaultAmpRegistration.test.ts (Missing value for flag: --command, exit 1). A Babel parse of top-level bindings in the 203 TypeScript files changed on main today found the duplicate import as the only new duplicate binding.
  • User-visible CLI/MCP output (if applicable): none added. The Amp test now accepts the existing validation error.
  • Remaining proof gaps: real GDB and Amp are not involved. These tests use the existing fake GDB spawner and the CLI fixture.

For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.

The GDB case is an existing boundary test of retained command output. The Amp case is an existing CLI boundary test that a rejected mcp add does not write settings. No lifecycle stage changed.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run format:check — passed. oxfmt reported all 6754 matched files use the correct format. Repeated after the test edits.
  • npm run check:fast — passed. Turbo typecheck and lint: 2 successful, including after the test edits. The pre-push hook ran the same check again from cache.
  • npm run test:focused for all 172 src/domain/javascript/**/*.test.ts files — passed. 4770 tests passed, including electronCallPathBlockPrefixes.test.ts (7 tests).
  • npm run test:focused -- tests/boundary/providers/GdbSessionManagerCoverage.test.ts tests/boundary/cli/defaultAmpRegistration.test.ts tests/boundary/cli/mcpAddOptionValidation.test.ts — passed. 200 tests passed (192 GDB coverage, 7 Amp registration, 1 mcp add option validation).

Commands ran on Linux with Node v24.22.1 after npm ci. No real Hopper, Ghidra, browser, or OS provider run; the GDB test uses its fake spawner.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable. No provider or target behavior changed.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none. Import-only production edit and test assertions. No new authority, I/O, or process control.

Author readiness

Human owner: @morluto

  • 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.
Open in Web Open in Cursor 

The squash of #7967 re-added the import already introduced in afc1813,
so typecheck failed with TS2300.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

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-11-04T12:29:02.519909Z
We couldn’t complete this review. Comment @codex review to try again.
151cc1e New commits
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no blocking issue was found.

Summary

Removes the duplicate childNodes import and updates two tests to match existing behavior.

  • JavaScript call-path analysis keeps one childNodes import.
  • CLI tests distinguish missing command values from agent choices.
  • GDB coverage follows the shared output-limit recovery message.

Reviews (2) · Last reviewed commit: "test(cli): keep rejected mcp add values ..." · Reviewed by Greptile

The retained-record limitation now names the command-output setting.
The coverage assertion still required the previous fixed-cap sentence.
mcp add now rejects a flag in the --command value position. The Amp
registration test still treated that invocation as a successful selection.
@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.

@morluto
morluto merged commit 89317a3 into main Nov 4, 2026
49 checks passed
@morluto
morluto deleted the cursor/remove-duplicate-childnodes-import-ae6a branch November 4, 2026 12:43
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants