Repository navigation
fix(pty): load omp status extension in wsl shells - #7642
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesThis PR forwards Related PRs: None specified. Suggested labels: windows, wsl, tests Suggested reviewers: None specified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/shared/wsl-login-shell-command.ts (1)
59-63: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winConsider validating individual zsh dotfiles, not just the directory.
The bash branch checks the specific rcfile (
-f .../bash/rcfile), but the zsh branch only checks that thezshdirectory exists (-d). If a prior wrapper-write attempt partially failed (per thecatchblock inensureShellReadyWrappersAt, e.g..zlogin— which hosts the OMP wrapper — failed to write while the directory and other files succeeded),ZDOTDIRwould still be set to an incomplete directory, silently dropping the OMP extension load without any fallback signal.♻️ Proposed tightening of the zsh existence check
- if [ -n "${_orca_shell_ready_root:-}" ] && [ -d "${_orca_shell_ready_root}/zsh" ]; then + if [ -n "${_orca_shell_ready_root:-}" ] && [ -f "${_orca_shell_ready_root}/zsh/.zlogin" ]; then
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e2a5037c-9da3-4c27-a413-c7d3d46e82b8
📒 Files selected for processing (9)
src/main/ipc/pty.test.tssrc/main/ipc/pty.tssrc/main/providers/local-pty-shell-ready.tssrc/main/providers/windows-shell-args.test.tssrc/main/providers/windows-shell-args.tssrc/main/pty/wsl-orca-env.test.tssrc/main/pty/wsl-orca-env.tssrc/shared/wsl-login-shell-command.test.tssrc/shared/wsl-login-shell-command.ts
|
Thanks for this — reusing the shell-ready wrapper tree to carry |
Revert the getShellReadyWrapperRoot precedence flip: env-first let an
inherited ORCA_USER_DATA_PATH (Orca launched from another Orca's
terminal) win over app.getPath('userData'), diverging the wrapper
writer root from the root buildPtyHostEnv forces onto WSL children —
the rcfile the child looks for was never written, silently disabling
the omp extension shim. It also changed wrapper-root resolution on
every local macOS/Linux spawn for no WSL reason. app-first restores
the pre-existing behavior; the WSL fix only needs the env fallback in
app-less contexts (daemon, tests), which both orderings preserve.
Also pin the end-to-end contract in windows-shell-args.test.ts: the
materialized bash rcfile and zsh .zlogin must carry the omp
--extension wrapper a WSL launch exists to deliver.
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]> Co-authored-by: Brennan Benson <[email protected]>
Summary
--extensionwhile OMP subcommands keep their normal argv shape.Closes #7091.
Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildFocused validation run in this session:
pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/pty.test.ts src/main/providers/windows-shell-args.test.ts src/main/providers/local-pty-shell-ready.test.ts src/main/pty/wsl-orca-env.test.ts src/shared/wsl-login-shell-command.test.ts src/main/pty/omp-shell-wrapper.node-pty.test.ts- passed,Test Files 5 passed | 1 skipped (6),Tests 247 passed | 44 skipped (328).pnpm exec vitest run --config config/vitest.config.ts --reporter=verbose src/main/ipc/pty.test.ts -t "forces managed ORCA_USER_DATA_PATH for WSL spawns even when the caller provides a stale root"- passed,Test Files 1 passed (1),Tests 1 passed | 215 skipped (216).pnpm exec vitest run --config config/vitest.config.ts --reporter=verbose src/main/providers/windows-shell-args.test.ts- passed,Test Files 1 passed (1),Tests 23 passed (23), includingmaterializes shell-ready wrappers before building WSL shell args.pnpm run typecheck:node- passed.AI Review Report
ORCA_USER_DATA_PATHto the managed root, so wrapper creation and WSL consumption stay aligned.--extensionimplementation was added.Security Audit
ORCA_USER_DATA_PATHremains a local path export imported into WSL viaWSLENV; the new wrapper write stays inside that user-data tree.Notes
ORCA_USER_DATA_PATHis covered bysrc/main/ipc/pty.test.ts.src/main/providers/windows-shell-args.test.ts > resolveWindowsShellLaunchArgs > materializes shell-ready wrappers before building WSL shell argsis the proof surface for the routing fix.