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(scenarios): editor and no-model shims run on Windows - #42533
On Windows, scripts/scenarios/start-app.ts prepends its bin folder to PATH with a : separator. So the folder never reaches PATH. The file also writes the cursor and no-model shims as sh scripts, which Windows cannot run. terminal-bare-filename-opens-its-location.e2e.ts fails because the cursor shim never writes editor-args.txt. A Ctrl+click in that scenario opens the developer's real Cursor instead, if one is installed. Codex's binaryPath points at the no-model script, which Windows cannot run.
Change
prepareHome writes both shims with writeFakeCli from @t3tools/provider-testing/fakeCli. That helper writes a Node stub, with a .cmd launcher on Windows and an sh launcher elsewhere. startApp joins PATH with ; on Windows and : elsewhere. terminal-bare-filename-opens-its-location.e2e.ts builds its expected editor path with the host separator. It creates cat.done with echo, because a default Windows install has no touch on PATH.
Scope
This fixes a single simple bug in the scenario app on Windows. It has no issue because the wrong PATH separator is one line in start-app.ts. Two other terminal link scenarios still fail on Windows. This PR does not change them. terminal-hostname-file-link-opens-its-file.e2e.ts types a bash loop into the terminal, which runs PowerShell on Windows. terminal-file-uri-opens-its-exact-file.e2e.ts uses filenames with :, which Windows does not allow.
Verification
On Windows 11, vp run scenarios scenarios/terminal-bare-filename-opens-its-location.e2e.ts fails on main at da57ea2. editor-args.txt never appears, and the poll times out after 15 seconds. Current main has the same start-app.ts lines that cause the failure. With this change on a22a4f9, the scenario passes. scenarios/theme-keep-both-copy-keeps-css.e2e.ts also passes. I did not run the scenarios on Linux or macOS. On those hosts the shims now run through a Node stub, like the fake CLIs in #9567.
Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.
The scenario app put its bin folder on PATH with a ":" separator and
wrote the cursor and no-model shims as sh scripts. On Windows the folder
never reached PATH and neither shim could run, so the editor shim never
wrote editor-args.txt and Ctrl+click opened the real Cursor instead.
The shims now use writeFakeCli, which writes a Node stub with a .cmd
launcher on Windows, and PATH uses the host's delimiter. The bare
filename scenario builds its expected path with the host separator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewing files that changed from the base of the PR and between 1880ccc and 7f46c82.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
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
Walkthrough
The scenario setup now uses shared fake CLI helpers and a platform-specific PATH separator. The terminal bare-filename scenario now constructs host filesystem paths and checks for nonempty command output.
Changes: Scenario test updates
Layer / File(s)
Summary
CLI shim setup and startup paths scripts/package.json, scripts/scenarios/start-app.ts
The scripts workspace adds @t3tools/provider-testing. prepareHome uses writeFakeCli for the cursor and no-model shims. startApp uses ; on Windows and : on other platforms when joining the home bin directory to PATH.
Terminal scenario paths and assertions scripts/scenarios/terminal-bare-filename-opens-its-location.e2e.ts
The scenario uses effect/Path to construct host filesystem paths. It writes done to cat.done and checks that the file is nonempty. The expected editor argument uses the constructed host path.
Path filters excluded changed files. This rating applies only to the assessed changes.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the scenario editor and no-model shims are fixed to run on Windows. It matches the raw summary, which shows the shims now use writeFakeCli and PATH joins use the host …
Description check
The description follows the template sections: Problem, Change, Scope, and Verification. It explains the Windows PATH separator bug and the sh-script shims, and it describes how writeFakeCli, the sepa…
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 scenario editor and no-model shims are fixed to run on Windows. It matches the raw summary, which shows the shims now use writeFakeCli and PATH joins use the host separator. The title is a conventional commit with a clear scope, and it is 56 characters long.
Full details: Description check
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. It explains the Windows PATH separator bug and the sh-script shims, and it describes how writeFakeCli, the separator change, and the echo-based cat.done fix address them. It links no issue and gives a reason for that. Its Scope section explains that the PR fixes one bug. Verification lists the Windows 11 runs, the before and after results, and what was not tested (Linux and macOS). It also names the model and harness, as the template asks. It does not include screenshots, which is acceptable because the change does not affect the UI.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
scripts/scenarios/start-app.ts-61-61: 1
61-61: Trivial · Maintainability & Code Quality · Heavy lift
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Use Effect filesystem operations for shim creation.
writeFakeCli performs synchronous Node filesystem calls outside FileSystem.FileSystem. Failures therefore bypass the typed Effect error channel, and tests cannot substitute the filesystem service. Provide an Effect-based shim writer with typed errors.
As per coding guidelines, “Use Effect platform services” and use Schema.TaggedError for failures. As per path instructions, scripts must use Effect and NodeServices rather than raw Node filesystem operations.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Windows Server 2025, headless Chromium, 1280×800, light theme, fresh scenario homes and synthetic Replay data on both sides. Invoke no-model, print the compiler diagnostic using cat build.log; echo done > cat.done, Ctrl+click main.c:1:25, and inspect the recorded editor arguments. Checkout paths are redacted; recordings omit startup.
Base could not find no-model and never created editor-args.txt. Head executed no-model with exit code 1 and recorded --classic, --goto, and <project>\main.c:1:25.
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:M30-99 changed lines (additions + deletions).vouch:unvouchedAuthor 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.
Problem
On Windows,
scripts/scenarios/start-app.tsprepends its bin folder toPATHwith a:separator. So the folder never reachesPATH. The file also writes thecursorandno-modelshims asshscripts, which Windows cannot run.terminal-bare-filename-opens-its-location.e2e.tsfails because thecursorshim never writeseditor-args.txt. A Ctrl+click in that scenario opens the developer's real Cursor instead, if one is installed. Codex'sbinaryPathpoints at theno-modelscript, which Windows cannot run.Change
prepareHomewrites both shims withwriteFakeClifrom@t3tools/provider-testing/fakeCli. That helper writes a Node stub, with a.cmdlauncher on Windows and anshlauncher elsewhere.startAppjoinsPATHwith;on Windows and:elsewhere.terminal-bare-filename-opens-its-location.e2e.tsbuilds its expected editor path with the host separator. It createscat.donewithecho, because a default Windows install has notouchonPATH.Scope
This fixes a single simple bug in the scenario app on Windows. It has no issue because the wrong
PATHseparator is one line instart-app.ts. Two other terminal link scenarios still fail on Windows. This PR does not change them.terminal-hostname-file-link-opens-its-file.e2e.tstypes a bash loop into the terminal, which runs PowerShell on Windows.terminal-file-uri-opens-its-exact-file.e2e.tsuses filenames with:, which Windows does not allow.Verification
On Windows 11,
vp run scenarios scenarios/terminal-bare-filename-opens-its-location.e2e.tsfails on main at da57ea2.editor-args.txtnever appears, and the poll times out after 15 seconds. Current main has the samestart-app.tslines that cause the failure. With this change on a22a4f9, the scenario passes.scenarios/theme-keep-both-copy-keeps-css.e2e.tsalso passes. I did not run the scenarios on Linux or macOS. On those hosts the shims now run through a Node stub, like the fake CLIs in #9567.Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.