Repository navigation
test(inspector): spell Node discovery targets as Node reports them - #10663
Conversation
The fake V8 Inspector gave Node-type targets a percent-encoded WHATWG file URL, while Node's /json/list reports `file://` plus the raw pathname with quotes and backslashes replaced by underscores. The product reads that channel literally, so a TMPDIR containing a space or percent sign named a pathname that did not exist and the target stayed unresolved: the Inspector cancellation test and "includes targets outside the old caller root filter" failed on unrelated assertions. Add nodeDiscoveryTargetUrl to the fake and use it where a resolved Node target location is asserted. The underscore case stays with createNodeDiscoveryTempDirectory. Validation: 69 inspector/browser/MCP/acceptance test files, 1168/1168 passing under TMPDIR spellings with an underscore, a space, a percent sign and none; check:fast passes. Refs morluto#9996
Codex Review Summary: ✅ CompletedThis 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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Low impact] This test-only PR appears safe to merge; no new blocking issues were found. SummaryThis test-only change makes fake Node Inspector targets use Node’s raw path spelling and adds explicit special-character coverage.
Reviews (7) · Last reviewed commit: "Merge main into the Node discovery spell..." · Reviewed by Greptile |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Review follow-up for Node discovery target URLs. Neither caller gave nodeDiscoveryTargetUrl an explicit special-character path, so spaces and percent signs were exercised only when TMPDIR happened to contain them. A boundary case now lists two targets in one discovery root. "with space %41.js" is reported literally and resolves to its file. 'with "quote".js' is reported with underscores and stays an unresolved, unverifiable file location. Tests: tests/boundary/inspector/javascriptRuntimeObservation.test.ts passes (31).
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Davmunrey
left a comment
There was a problem hiding this comment.
Status since opening:
- Greptile's request for explicit special-character coverage is addressed in ca43163:
with space %41.jsresolves to its file;with "quote".jsstays an unresolved, unverifiable location.
- javascriptRuntimeObservation boundary tests pass (31). Format and static checks pass with the branch merged into current main.
- This replaces #10622, closed after its readiness declaration failed.
|
Ready to merge: full CI is green on this head, Greptile's latest review is 5/5 with no open threads, and it merges into main 42cab26 without conflicts. |
main consolidated the Inspector coverage and removed the test for targets outside the old caller root filter, which this branch had edited. Follow that removal and keep the test this branch adds for discovery paths with spaces, percent signs and quotes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5d31dc2c3
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…s it main folded the test this branch had respelled into "lists all connectable targets on the selected endpoint across directories", which still built its two discovery targets with pathToFileURL. Under a temporary directory with a space or a percent sign those targets came back unresolved and the file-location assertions failed. Build them with nodeDiscoveryTargetUrl, as the rest of this branch does.
main replaced the fixture's additionalTargetUrl option with additionalTargets. The three call sites here pass the Node-reported spelling through the new option.
Lists morluto/rea#10683 and morluto/rea#10663, both merged on 18 November.
Summary
Fixes #9996. 583bb47 and f35b6a7 already fixed the underscore case. On
main, a space or%inTMPDIRstill fails the Inspector cancellation test andincludes targets outside the old caller root filter.Problem and expected behavior
The fake V8 Inspector reported Node-type targets as
pathToFileURL(path).href, which is a percent-encoded WHATWG URL. Node's/json/listreportsfile://followed by the raw pathname, with"and\replaced by_.authorizeRuntimeTargetLocationreads that value literally, so/tmp/space%20root/…points to a path that does not exist. The target stays unresolved, and the tests fail on unrelated assertions.Change and scope
tests/fixtures/inspector/fakeV8Inspector.tsaddsnodeDiscoveryTargetUrl(path), which spells target URLs the way Node does.createNodeDiscoveryTempDirectory. This is a test-only change.Evidence and regression coverage
1ba93b4, withTMPDIRcontaining a space or%, the cancellation test fails 1 of 5 in each case. With_it already passes.bad_root,space root,pct%rootandgoodroot.Validation performed
npm run test:focused -- <69 files>under 4TMPDIRspellings: all 1168 tests passed.npm run check:fast: passed.Author readiness
Human owner: @Davmunrey
Before merging
type(scope): outcome.