fix(doctor): avoid duplicate gateway runtime warnings#79203
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a2f9a3bee
ℹ️ 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".
| : null; | ||
| const systemNodePath = systemNodeInfo?.supported ? systemNodeInfo.path : null; | ||
| if (needsNodeRuntime && !systemNodePath) { | ||
| if (needsNodeRuntime && !systemNodePath && runtimeChoice !== "node") { |
There was a problem hiding this comment.
Preserve missing-system-node warning for node migration
The new guard runtimeChoice !== "node" suppresses this entire warning block for version-managed Node services, even when needsNodeRuntime is true and resolveSystemNodeInfo returns null (no system Node found). In that case buildGatewayInstallPlan does not emit a specific runtime warning either (because renderSystemNodeWarning(null) is empty), so the previous fallback guidance about installing system Node is now lost from the Gateway runtime notes. This is a behavior regression for users who only have version-manager Node installed and need migration guidance.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. Source inspection gives a high-confidence path for both the reported duplicate warning on current main and the PR regression: with Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Keep the deduplication intent, but suppress the doctor fallback only when a specific install-plan runtime warning was actually emitted, and add coverage for the version-manager Node plus no-system-Node case. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence path for both the reported duplicate warning on current main and the PR regression: with Is this the best way to solve the issue? No. The PR is close, but the Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 0f31b6424ef9. Re-review progress:
|
985011f to
ebc5b92
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebc5b9274b
ℹ️ 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".
| @@ -422,15 +422,16 @@ export async function maybeRepairGatewayServiceConfig( | |||
| ? await resolveSystemNodeInfo({ env: process.env }) | |||
| : null; | |||
| const systemNodePath = systemNodeInfo?.supported ? systemNodeInfo.path : null; | |||
| if (needsNodeRuntime && !systemNodePath) { | |||
| if (needsNodeRuntime && !systemNodePath && runtimeChoice !== "node") { | |||
There was a problem hiding this comment.
Preserve missing-system-node warning during Node migration
The new runtimeChoice !== "node" guard suppresses this warning path when the service already runs node, but that is exactly the case for version-manager Node migrations. If needsNodeRuntime is true and resolveSystemNodeInfo returns null (no system Node installed), this branch now emits nothing, and buildGatewayInstallPlan also emits no runtime warning when renderSystemNodeWarning(null) is empty. In that scenario users lose the explicit install guidance despite a required migration path.
Useful? React with 👍 / 👎.
8bec5fe to
4ad7b51
Compare
4ad7b51 to
1f3d2d4
Compare
Summary
node, and the duplicate generic warning is only emitted when no specific warning is available.Verification
git diff --check origin/main..HEADpnpm test src/commands/doctor-gateway-services.test.ts— 25 passednode -e 'console.log(process.platform, process.version)'—darwin v25.9.0Real behavior proof
pnpm test src/commands/doctor-gateway-services.test.tsTest Files 1 passed (1); Tests 25 passed (25)Security Impact
Risks and Mitigations
runtimeChoice === "node"; unsupported/missing Node still warns.Linked Issue
Closes #79243