Skip to content

fix(scenarios): editor and no-model shims run on Windows - #42533

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
pauldupuyjr:scenario-shims-windows
Nov 25, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
pauldupuyjr:scenario-shims-windows

Conversation

@pauldupuyjr

Copy link
Copy Markdown
Contributor

Problem

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>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Run configuration

Commits

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested labels: bugfix

Suggested reviewers: stienswout, juliusmarminge

Merge Risk: Minimal · previous review 1880c · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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.

Also applies to: 70-70

Sources: Coding guidelines, Path instructions

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b8be228 and 1880ccc.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 3

  • scripts/package.json
  • scripts/scenarios/start-app.ts
  • scripts/scenarios/terminal-bare-filename-opens-its-location.e2e.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.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 25, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

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.

Before After
6e597243d4 7f46c821ab
Before: no-model not recognized After: no-model shim executes
Before: editor recording missing After: expected editor arguments recorded
Before recording After recording

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.

Scenario driver

Not shown:

  • The installed-real-Cursor fallback was not exercised; neither run discovered a real Cursor installation.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 25, 2026
@juliusmarminge
juliusmarminge merged commit 39a8d1f into pingdotgg:main Nov 25, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants