test(server): launcher PATH lookup test no longer drops the Windows drive letter #22534
main fromrefs/pull/22534/head·merged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHubProblem#
apps/server/src/cli/update.test.ts › "finds the launcher a bare command name resolved to on PATH" fails on Windows every time (item 3 of #22324). The expected path is C:\Users\...\bin\t3, but the test receives \Users\...\bin\t3.
The test forces HostProcess.Platform to linux but builds its PATH from native path.join paths joined with :. For a non-win32 platform, resolveLauncherPath splits PATH on :. On Windows that turns C:\Users\...\bin into the two entries C and \Users\...\bin. That drive-relative path resolves against the current drive, so it exists, and the lookup returns it without the drive letter.
Product code is not affected. HostProcess.Platform defaults to process.platform, and nothing on the t3 update or t3 uninstall path overrides it, so real Windows runs always split on ;.
Change#
Test-only. This test now runs on the host platform and joins its PATH with that platform's delimiter. The neighbouring symlink tests still force linux, because repointLauncher takes its symlink branch only on POSIX. This test only needed the delimiter.
This is the same change as #20210, which was closed in triage before contributors were invited to pick up #22324.
Scope and approval#
Item 3 of #22324. @juliusmarminge invited picking up the remaining #22324 items in https://github.com/pingdotgg/t3code/pull/22511#issuecomment-6302376246. One test, no product code.
Verification#
- Ran the unchanged
resolveLauncherPathwithpath.win32paths and a filesystem that resolves rooted paths againstC:, as Windows does. Under forcedlinuxwith:, it probedC\t3,\Users\...\missing\t3,C\t3, and\Users\...\bin\t3, and returned\Users\...\bin\t3, the reported failure. Underwin32with;, it returnedC:\Users\...\bin\t3. vp test run apps/server/src/cli/update.test.tson Linux: 10/10 pass.- I could not run the suite on a Windows host.
Investigated and written by Claude Opus 5.5 in Claude Code (T3 Code), reviewed by GPT-6.1-Sol in Codex.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Approvability#
Verdict: Approved at
497adbdMacroscope's review found this PR approvable — This PR is confined to an ignored test file and adjusts only PATH delimiter/platform setup so the launcher lookup test works on Windows. No production behavior, product defaults, or static-analysis configuration is changed.
Notes:
- No code objects were reviewed. Approvability was decided on eligibility alone.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b7586ca1-1f55-4431-a03f-4c37d319d2b2
📥 Commits
-
Reviewing files that changed from the base of the PR and between fe27e8e3dc12dcbb108e9a28fd9b8cb65f34ae92 and 80779e4400330602a646078ef53a658651a8b5a9.
📒 Files selected for processing: 1
-
apps/server/src/cli/update.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
-
📝 Walkthrough
-
The launcher PATH-resolution test now uses the active platform’s delimiter when constructing its PATH fixture. The test no longer overrides the platform service with
"linux".Changes: Launcher resolution test
Layer / File(s) Summary Use host platform in launcher test
apps/server/src/cli/update.test.tsThe test selects ;on Windows and:on other platforms, then uses that delimiter to construct its PATH fixture.Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other
Suggested reviewers:
juliusmarminge
Merge Risk: ⚪ Minimal · up to
80779-
This test-only change is aligned with platform behavior and has no identified merge-blocking risk.
Architecture risk: 🔵 Low · up to
80779-
The change affects 1 system.
Changed systems:
apps/serverArchitecture concerns No architecture-level concerns identified.
Review details
-
Systems and components
- observed — apps/server (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
- observed — Modified behavior in apps/server/src/cli/update.test.ts: The test derives the PATH delimiter from the active platform, selecting
;for Windows and:for other platforms. - observed — Modified behavior in apps/server/src/cli/update.test.ts: The test constructs its PATH using the platform-specific delimiter instead of a hard-coded colon.
-
Pre-merge checks:
4-
Check name Status Explanation Description check The description includes all required sections. It clearly explains the Windows failure, the test-only fix, scope and approval, verification results, and the unavailable Windows-host test. Title check The title is concise, specific, and accurately describes the launcher PATH lookup test fix for Windows drive-letter handling. 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.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes