Repository navigation
fix(javascript): remove duplicate childNodes import - #8886
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Low impact] The PR appears safe to merge; no blocking issue was found. SummaryRemoves the duplicate
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.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Summary
src/domain/javascript/electronCallPathBlockPrefixes.tsimportedchildNodestwice, 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
afc18131faddedimport { childNodes } from "./javascriptSemanticTraversal.js";. Squash-merged #7967 added the same import again, with a blank line between the two. TypeScript reportsDuplicate identifier 'childNodes'. The module should importchildNodesonce and typecheck.Two later CI failures were the same kind of merge drift:
GdbSessionManagerCoveragestill expected the old sentence16777216 byte or 16384 record cap. This release has no runtime override.The session now reports the command-output cap anddebuggerAdmissionRecovery.defaultAmpRegistrationstill treatedmcp add --command --agent ...as a successful non-Amp selection.mcp addnow rejects a flag in the--commandor-cvalue 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 (sortImportsis 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_LIMITanddebuggerAdmissionRecovery. 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 withMissing 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
electronCallPathBlockPrefixes.tsalready owned thechildNodesimport fromjavascriptSemanticTraversal.ts. Consumers are unchanged. GDB limitation text stays owned bygdbRetainedOutputLimitationanddebuggerAdmissionRecovery.mcp addvalue rejection stays owned by the CLI pre-check insrc/cli.ts. Tests are the only consumers updated.mcp addrejection of a flag used as a command value.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; 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.
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/boundary/providers/GdbSessionManagerCoverage.test.tsandtests/boundary/cli/defaultAmpRegistration.test.ts. No new test file.electronCallPathBlockPrefixes.test.tsalready covers that module.src/domain/javascript/electronCallPathBlockPrefixes.tswere the samechildNodesimport. CI on25e847275then failedtests/boundary/providers/GdbSessionManagerCoverage.test.ts(toContainthe old cap sentence) andtests/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.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 adddoes not write settings. No lifecycle stage changed.For evidence-bearing changes:
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:focusedfor all 172src/domain/javascript/**/*.test.tsfiles — passed. 4770 tests passed, includingelectronCallPathBlockPrefixes.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
Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.