chore: start server processes with node inspector#2361
Conversation
|
Here's a visual recap of what changed: Open the full interactive recap |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This reverts commit 6d78115.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Builder reviewed your changes and found 1 potential issue 🟡
Review Details
Code Review Summary
This incremental review covers the unchanged latest PR head for Node inspector support in agent-native dev and the template script updates. The single-app implementation correctly separates Vite from the Nitro server, resolves Vite's JS entry, injects NODE_OPTIONS through a preload, and preserves the normal non-inspector path.
Key Findings
- 🟡 Windows inspector startup can fail — the new data-URL preload is passed through the existing Windows
shell: truepath, wherecmd.execan expand the URL's percent-encoded sequences before Node receives it. This can corrupt the preload and preventagent-native dev --inspectfrom starting on Windows. - 🟡 Workspace-root inspector propagation remains outstanding from the previous review; it is still covered by the existing open review comment and is not resubmitted.
Risk level: Standard. The rest of the updated single-app path had no additional confirmed issues.
🧪 Browser testing: Skipped — PR only modifies CLI/process startup and package configuration, with no user-facing UI impact.
| const preload = | ||
| "data:text/javascript," + | ||
| encodeURIComponent( | ||
| `process.env.NODE_OPTIONS=((process.env.NODE_OPTIONS??"")+" ${directive}").trim();`, | ||
| ); | ||
| const env = { | ||
| ...process.env, | ||
| NITRO_DEV_RUNNER: process.env.NITRO_DEV_RUNNER ?? "node-process", | ||
| }; | ||
| console.log(`[agent-native] API server debugger listening on ${target}`); | ||
| run(process.execPath, ["--import", preload, viteJsEntry, ...rest], { env }); |
There was a problem hiding this comment.
🟡 Avoid routing the encoded preload through cmd.exe on Windows
On Windows, run() sets shell: true, so this new invocation is serialized through cmd.exe. The percent-encoded data: URL contains %xx sequences from encodeURIComponent; cmd.exe can expand paired percent signs before Node receives the argument, corrupting the preload module URL and causing agent-native dev --inspect to fail. Launch this Node/Vite-entry path without a shell, or use a shell-safe preload representation, while preserving the existing shell behavior for the non-inspector Vite shim path.
Additional Info
Confirmed by one independent review agent; applies to the new inspector launch at lines 599-609.
|
@builderio-bot can you investigate why |
|
Investigated. Root cause was in the test's hand-rolled fetch mock, not in In both Under This is unrelated to this PR's changes (which only touch the CLI dev-inspect-flag work) — it's a pre-existing flaky test from a same-day commit ( Fix pushed to |
|
Root cause found and fixed: the two hung-poll tests in ⠀ |
There was a problem hiding this comment.
Builder reviewed your changes — no new findings
Review Details
Code Review Summary
This incremental review covers the latest PR #2361 head, which adds the Node inspector launch path and updates the A2A abort-signal test mocks. The new A2A mock behavior correctly handles signals already aborted before listener registration while preserving the existing asynchronous abort behavior. The inspector implementation remains sound for single-app mode, including Vite entry resolution, Nitro runner selection, and environment propagation.
Key Findings
No new confirmed issues were found in the latest changes. The existing workspace-root inspector propagation and Windows cmd.exe preload concerns remain open and were intentionally not reposted. One reviewer also verified the A2A test suite passes.
Risk level: Standard.
🧪 Browser testing: Skipped — PR only modifies CLI/process startup, tests, and package configuration, with no user-facing UI impact.

Starts API servers with
--inspector--inspect-brkflag so breakpoints can be used to debug the server.