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(cli): ignore non-executable paths when checking installation - #37903
t3 install treats any earlier path named t3 as a command that shadows the installed launcher. A directory or a regular file without execute permissions therefore produces an incorrect warning and suppresses the PATH setup hint, although the shell skips it.
Found by comparing the install result with native /bin/sh lookup in an isolated temporary T3 home.
Change
Use the existing shared command resolver for each explicit candidate instead of checking existence. Extend the existing installation test with an earlier directory; make its genuine executable control executable.
Scope
Small correction to CLI installation diagnostics, qualifying for the obvious-bug exception without a prior issue. Two files. The separate desktop path already received its own executable check in merged #22046; this fixes the CLI path introduced by #33150. Targeted searches found no competing CLI fix.
Verification
The runtime replay calls the actual installer, then /bin/sh selects and executes t3. All writes are confined to a temporary home.
Earlier PATH entry
Native shell runs
Before: CLI reports shadow
After: CLI reports shadow
Non-executable file
Installed launcher
Yes
No
Directory
Installed launcher
Yes
No
Executable file
Earlier command
Yes
Yes
Regression with baseline source fails at assert.isTrue(directory.onPath); fixed module: 3/3 tests pass.
vp run check:changed --concurrency 1: passed, including 3 affected typechecks and 5 tests across 2 files. Normal commit hooks passed (format, lint, Knip).
Additional bounded checks against the real installer and native shell: fast-check 80 cases; Jazzer.js reproduces the baseline failure and passes 200 fixed runs. Cases include executable/non-executable files, directories, missing paths and symlinks, with the install directory present or absent from PATH.
StrykerJS: 2/3 mutants killed. The survivor removes the explicit environment option and falls back to the same injected environment, making it equivalent in this harness.
Fallow: sparse two-file audit and review validation passed; inherited findings remain. CodeScene reported a failed quality gate because the existing enclosing test factory grows from 204 to 211 lines (threshold 70); it reported no production-file degradation. Kept the focused regression in its existing case as the repository requests.
Local execution: Linux, Node 24.15, one CPU worker. No native macOS/Windows or desktop session was run.
Independent reviews: GPT-6.1 Sol high and Grok 4.7 Fast high each approved in one read-only round with no actionable findings. Both accepted the disclosed CodeScene test-length advisory.
Authored with GPT-6.1 Sol in the Codex harness through T3 Code.
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Macroscope's review found this PR approvable — Installation checks now ignore non-executable paths when determining whether another t3 command takes precedence. The change affects status and PATH guidance while leaving launcher installation safeguards unchanged.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between 2f5c08d and 4178c7c.
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 installer now uses command resolution to check whether an earlier PATH entry shadows the installed command. The test covers an executable file that shadows the command and a directory that does not.
The installer uses resolveCommandPath with the current environment to find a shadowing command. The test verifies that an executable file shadows the installed command, while a directory does not.
The installer's PATH check now ignores directories and non-executable files while still detecting executable commands that shadow the installed one. The change is small, covered by a regression test, and I found no remaining merge risk.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the CLI installation check now ignores non-executable paths. It follows the conventional commit format and matches the raw summary, the PR objectives, and the descript…
Description check
The description follows the repository template. It has Problem, Change, Scope, and Verification sections, and each one has concrete content. The Problem section explains the bug and the reproduction …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the CLI installation check now ignores non-executable paths. It follows the conventional commit format and matches the raw summary, the PR objectives, and the description. The title is specific and accurate.
Full details: Description check
Explanation
The description follows the repository template. It has Problem, Change, Scope, and Verification sections, and each one has concrete content. The Problem section explains the bug and the reproduction method. The Change section explains the fix. The Scope section cites the obvious-bug exception and links related PRs. The Verification section gives focused tests, a results table, and the environment limits. The author also states the model and harness used, as the template asks. The description does not link a GitHub issue, but it explains why none is needed, which the template allows.
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 d7373c4 and 2f5c08d.
Files selected for processing: 2
apps/server/src/cli/install.test.ts
apps/server/src/cli/install.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.
Ran the real standalone installer on Linux x86_64/Bash with fresh synthetic homes: no earlier candidate; directory and mode-644 file before the installed bin; both candidates with bin absent from PATH; and a genuine mode-755 executable shadow. After each install, ran t3 --version through Bash under the same PATH.
Base falsely reports directories and non-executable files as running first and suppresses missing-PATH guidance. Head skips them, reports startup or PATH setup guidance appropriately, and preserves the genuine executable-shadow warning. Both controls behave correctly. Images render captured command output, with synthetic sandbox paths normalized to $DEMO.
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:trustedAuthor is trusted by repo permissions or the VOUCHED list.
3 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.
Problem
t3 installtreats any earlier path namedt3as a command that shadows the installed launcher. A directory or a regular file without execute permissions therefore produces an incorrect warning and suppresses the PATH setup hint, although the shell skips it.Found by comparing the install result with native
/bin/shlookup in an isolated temporary T3 home.Change
Use the existing shared command resolver for each explicit candidate instead of checking existence. Extend the existing installation test with an earlier directory; make its genuine executable control executable.
Scope
Small correction to CLI installation diagnostics, qualifying for the obvious-bug exception without a prior issue. Two files. The separate desktop path already received its own executable check in merged #22046; this fixes the CLI path introduced by #33150. Targeted searches found no competing CLI fix.
Verification
The runtime replay calls the actual installer, then
/bin/shselects and executest3. All writes are confined to a temporary home.assert.isTrue(directory.onPath); fixed module: 3/3 tests pass.vp run check:changed --concurrency 1: passed, including 3 affected typechecks and 5 tests across 2 files. Normal commit hooks passed (format, lint, Knip).Local execution: Linux, Node 24.15, one CPU worker. No native macOS/Windows or desktop session was run.
Independent reviews: GPT-6.1 Sol high and Grok 4.7 Fast high each approved in one read-only round with no actionable findings. Both accepted the disclosed CodeScene test-length advisory.
Authored with GPT-6.1 Sol in the Codex harness through T3 Code.