You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ssh): distinguish incompatible Node from a missing executable - #35607
The development SSH launcher reports an incompatible remote Node version and then incorrectly says Node is missing. Only print the missing-executable guidance when discovery actually leaves no node command, preserving the original engine diagnostic and exit status.
Added a regression case that runs the production SSH launch script in a real shell with incompatible and missing Node fixtures. Before the fix, the incompatible case included both messages; afterward it retains only the version diagnostic. Missing Node still reports installation guidance. Both exit 1.
Ran the generated engine probe outside the test transformer with real Node 26.12.1 and an unsupported range: exit=1; Remote node 26.12.1 does not satisfy required range >=999.0.0.
Validation limits on this Windows host: check:changed passes formatting, lint, and both knip checks. Its test step hits three existing shell-fixture failures (archive download, missing gzip, and POSIX versus Windows server PID); all three also fail on untouched origin/main. The affected SSH package typecheck passes. The dependent server typecheck reports an unavailable FileFinder.scanFilesAsync API in unchanged WorkspaceSearchIndex.ts.
Macroscope's review found this PR approvable — The SSH launcher stops reporting Node as missing when an executable exists but is incompatible. Validation and launch failure behavior remain unchanged; the change only refines the error output.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between 78e54c1 and df62432.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The remote launch script now prints the missing-Node diagnostic only when Node is unavailable. It still exits with status 1 when Node does not meet the required engine range. A live test checks both failure cases.
Changes: Remote Node diagnostics
Layer / File(s)
Summary
Node failure diagnostics and test packages/ssh/src/tunnel.ts, packages/ssh/src/tunnel.test.ts
The launch script prints the missing-Node diagnostic only when Node is unavailable. The test checks that missing Node and an incompatible version produce distinct diagnostics, and that both exit with status 1.
This change only affects which error message the SSH launch script prints, and it keeps the exit status. The new test was reported failing in CI, but a source review found no path to that failure. Confirm that CI passes before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the SSH script now separates an incompatible Node version from a missing Node executable. It uses a conventional commit prefix and fits the summary, objectives, and li…
Description check
The description covers the problem, the change, the linked issue, and detailed verification. It does not follow the template headings (Problem, Change, Scope, Verification). It lacks an explicit Scope…
Linked Issues check
Issue #35583 requires three coding outcomes. (1) An installed Node that fails the engine range must produce only the version diagnostic. In packages/ssh/src/tunnel.ts, the missing-Node printf in REMOT…
Out of Scope Changes check
The whole-PR diff (merge base 91f55d9 to head 78e54c1) touches only packages/ssh/src/tunnel.ts and packages/ssh/src/tunnel.test.ts. The tunnel.ts change is a three-line guard around the existing missi…
Full details: Title check
Explanation
The title names the main change: the SSH script now separates an incompatible Node version from a missing Node executable. It uses a conventional commit prefix and fits the summary, objectives, and linked issue #35583.
Full details: Description check
Explanation
The description covers the problem, the change, the linked issue, and detailed verification. It does not follow the template headings (Problem, Change, Scope, Verification). It lacks an explicit Scope statement that justifies the fix as a bug fix, although it links issue #35583. The verification section is detailed and states what could not be checked. The model and harness are named at the end.
Full details: Linked Issues check
Explanation
Issue #35583 requires three coding outcomes. (1) An installed Node that fails the engine range must produce only the version diagnostic. In packages/ssh/src/tunnel.ts, the missing-Node printf in REMOTE_LAUNCH_SCRIPT is now wrapped in if ! command -v node >/dev/null 2>&1; then. When node exists but ensure_remote_node_path fails, the missing-Node message is skipped and the engine diagnostic from ensure_remote_node_path remains. (2) Missing Node must keep its guidance. When command -v node fails, the message is still printed. (3) Exit status is unchanged. exit 1 still runs after the branch in both cases. The new test in packages/ssh/src/tunnel.test.ts runs launchOrReuseRemoteServer with an incompatible-Node fixture and a missing-Node fixture. It asserts exitCode 1 and asserts each message appears only in its matching case. The requirement to keep successful launch with a compatible Node on PATH and to reject without automatic selection is not changed by this diff. It relies on existing behavior, which this review did not re-run. No non-coding requirements were found. The shell-fixture failures reported on Windows were not re-run in this review.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff (merge base 91f55d9 to head 78e54c1) touches only packages/ssh/src/tunnel.ts and packages/ssh/src/tunnel.test.ts. The tunnel.ts change is a three-line guard around the existing missing-Node printf. The test.ts change adds one regression case for the same behavior. Both changes connect directly to #35583. No unrelated changes were found.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between d6063b5 and 78e54c1.
Files selected for processing: 1
packages/ssh/src/tunnel.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
packages/ssh/src/tunnel.test.ts-182-183: 1
182-183: Major · Functional Correctness · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Repair the shell fixture that fails in CI.
The supplied Test check reports exit code 127 at Line 199, not 1. This added test therefore fails before it checks either diagnostic. Inspect the captured result.failure.stderr to identify the failing shell command, then correct the fixture or its environment. Keep the expected exit code 1.
Reviewing files that changed from the base of the PR and between 7eca0ed and d6063b5.
Files selected for processing: 2
packages/ssh/src/tunnel.test.ts
packages/ssh/src/tunnel.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Environment: real Linux x86_64 Electron desktop under headless-desktop; light theme; 1100×780 viewport. Separate fresh T3 homes with T3CODE_DEV_SEED=0 and no imported data. Real OpenSSH and Node binaries; no mocked diagnostics.
Steps on both commits: Settings > Environments > Add environment > SSH; enter diagnostic-proof, username user, port 22367; Add environment. Repeat with Node 18.20.8, no discoverable Node, and Node 24.10.0.
Base displays both diagnostics; head displays only the incompatible-version diagnostic. Both reject Node 18.20.8 with exit status 1. Missing Node retains installation guidance on both commits; Node 24.10.0 connects successfully on both.
main fixed the same bug in #35607 with an identical guard and a test that
covers both the incompatible and missing cases, so both conflicting files
take main's version.
AI-assisted; verified with the tests and tools listed above.
github-actionsBot
added a commit
to omarcresp/t3code-flake
that referenced
this pull request
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:XS0-9 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The development SSH launcher reports an incompatible remote Node version and then incorrectly says Node is missing. Only print the missing-executable guidance when discovery actually leaves no
nodecommand, preserving the original engine diagnostic and exit status.Fixes #35583.
Verification:
exit=1; Remote node 26.12.1 does not satisfy required range >=999.0.0.Validation limits on this Windows host:
check:changedpasses formatting, lint, and both knip checks. Its test step hits three existing shell-fixture failures (archive download, missing gzip, and POSIX versus Windows server PID); all three also fail on untouchedorigin/main. The affected SSH package typecheck passes. The dependent server typecheck reports an unavailableFileFinder.scanFilesAsyncAPI in unchangedWorkspaceSearchIndex.ts.Model: GPT-6.1 Sol. Harness: Codex in T3 Code.