Skip to content

refactor: group local PTY provider and shell readiness modules - #37235

Merged
nwparker merged 1 commit into
mainfrom
module-organization/d06-local-pty-provider-mc550fbca
Nov 2, 2026
Merged

nwparker merged 1 commit into
mainfrom
module-organization/d06-local-pty-provider-mc550fbca

Conversation

@nwparker

@nwparker nwparker commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 64 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​331 $\color{#cf222e}{\Huge{\mathbf{−}}}$​199 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​132
Prod 54 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​255 $\color{#cf222e}{\Huge{\mathbf{−}}}$​269 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14

Groups the local PTY provider, spawn lifecycle, foreground inspection, and shell-readiness implementation with their tests under src/main/providers/local-pty/ (47 file moves). Updates callers and test/CI routing together, uses concrete implementation owners, and removes forwarding exports from the moved modules. The generic working-directory validator remains at its existing owner.

Preserves the current physical-PTY foreground logic and existing platform, remote, and folder-workspace behavior. Reliability commands follow the moved tests; historical execution receipts retain their original commands with current aliases where needed.

Validation: 452 tests across 33 suites, plus a 34-test rerun after consolidating duplicate owner imports; node typecheck, lint/format, changed-code quality, test routing, process-host imports, flaky-pattern checks, and all 154 reliability gates pass locally. Independent native audits and merge-parent preservation checks are required before merge. Planning and evidence remain local.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2cc3aadb-f797-4be5-b0d7-380b1c97d466
Commits

Reviewing files that changed from the base of the PR and between 4d4ca42 and c552367.

Files selected for processing: 118
  • .github/workflows/computer-e2e.yml
  • .github/workflows/pr.yml
  • config/flaky-test-pattern-baseline.txt
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • config/scripts/ci-unit-files.mjs
  • config/scripts/node-server-qualification.test.mjs
  • config/scripts/pr-shell-contract-prefixes.mjs
  • config/scripts/vitest-node-runtime-files.mjs
  • src/main/cli/wsl-managed-cli.wsl.test.ts
  • src/main/daemon/daemon-pty-session-spawn.ts
  • src/main/daemon/daemon-pty-startup-delivery.test.ts
  • src/main/daemon/daemon-shared-owner-incarnation-retention.test.ts
  • src/main/daemon/node-pty-fd-leak.test.ts
  • src/main/daemon/pty-subprocess-cwd-cancel-identity.test.ts
  • src/main/daemon/pty-subprocess-env-inheritance.test.ts
  • src/main/daemon/pty-subprocess-foreground-identity.test.ts
  • src/main/daemon/pty-subprocess-foreground-scan-cadence.test.ts
  • src/main/daemon/pty-subprocess-git-credential-guard.test.ts
  • src/main/daemon/pty-subprocess-handle-lifecycle.test.ts
  • src/main/daemon/pty-subprocess-managed-agent-env.test.ts
  • src/main/daemon/pty-subprocess-windows-shell-launch.test.ts
  • src/main/daemon/pty-subprocess-wsl-launch.test.ts
  • src/main/daemon/pty-subprocess.test.ts
  • src/main/daemon/pty-subprocess/shell-launch-plan.ts
  • src/main/daemon/pty-subprocess/spawn-preflight.ts
  • src/main/daemon/shell-ready-bash-wrapper.test.ts
  • src/main/ipc/pty/ipc/spawn-env.ts
  • src/main/ipc/pty/ipc/spawn-preflight.ts
  • src/main/ipc/pty/ipc/terminal-view-attributes-ipc.test.ts
  • src/main/ipc/pty/kill-all.ts
  • src/main/ipc/pty/pane/stable-pane-absence-respawn.test.ts
  • src/main/ipc/pty/provider/local-configure.ts
  • src/main/ipc/pty/provider/registry-color-query-reply-colors.test.ts
  • src/main/ipc/pty/provider/registry.ts
  • src/main/ipc/pty/pty-antigravity-launch.test.ts
  • src/main/ipc/pty/pty-controller-ownership-routing.test.ts
  • src/main/ipc/pty/pty-hidden-at-spawn-mark.test.ts
  • src/main/ipc/pty/pty-ipc-suite-environment.ts
  • src/main/ipc/pty/pty-listener-teardown-and-orphans.test.ts
  • src/main/ipc/pty/pty-login-shell-startup-commands.test.ts
  • src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts
  • src/main/ipc/pty/pty-spawn-env-terminal-basics.test.ts
  • src/main/ipc/pty/register-handlers.ts
  • src/main/ipc/pty/runtime/operations.ts
  • src/main/ipc/pty/runtime/spawn-options.ts
  • src/main/ipc/pty/runtime/spawn-preflight.ts
  • src/main/ipc/ssh/plain-ssh-terminal-handlers.ts
  • src/main/local-builds/local-build-compatibility.ts
  • src/main/opencode/opencode-pty-launch.test.ts
  • src/main/orcad/orcad-packaged-node-pty.integration.test.ts
  • src/main/persistence/loading-store/pty-spawn-exit-durability.test.ts
  • src/main/persistence/migrating-orcad-catalog/orcad-shell-history-installer.ts
  • src/main/providers/__tests__/shell-ready-framework/shell-script-test.ts
  • src/main/providers/local-pty/local-pty-child-process-verdict.test.ts
  • src/main/providers/local-pty/local-pty-default-shell.test.ts
  • src/main/providers/local-pty/local-pty-executable-spawn.test.ts
  • src/main/providers/local-pty/local-pty-executable-spawn.ts
  • src/main/providers/local-pty/local-pty-finalize-environment.ts
  • src/main/providers/local-pty/local-pty-foreground-inspection-cheap-tier.test.ts
  • src/main/providers/local-pty/local-pty-foreground-inspection.ts
  • src/main/providers/local-pty/local-pty-launch-context.ts
  • src/main/providers/local-pty/local-pty-launch-plan.ts
  • src/main/providers/local-pty/local-pty-pending-native-spawn.test.ts
  • src/main/providers/local-pty/local-pty-provider-foreground-process.test.ts
  • src/main/providers/local-pty/local-pty-provider-io-events.test.ts
  • src/main/providers/local-pty/local-pty-provider-session-inventory.test.ts
  • src/main/providers/local-pty/local-pty-provider-shell-readiness.test.ts
  • src/main/providers/local-pty/local-pty-provider-shutdown.test.ts
  • src/main/providers/local-pty/local-pty-provider-spawn-cwd-safety.test.ts
  • src/main/providers/local-pty/local-pty-provider-spawn-env.test.ts
  • src/main/providers/local-pty/local-pty-provider-spawn-session.test.ts
  • src/main/providers/local-pty/local-pty-provider-state.ts
  • src/main/providers/local-pty/local-pty-provider-test-harness.ts
  • src/main/providers/local-pty/local-pty-provider-types.ts
  • src/main/providers/local-pty/local-pty-provider-windows-shell-launch.test.ts
  • src/main/providers/local-pty/local-pty-provider.ts
  • src/main/providers/local-pty/local-pty-runtime-spawn-wsl-allowlist.test.ts
  • src/main/providers/local-pty/local-pty-runtime-spawn.ts
  • src/main/providers/local-pty/local-pty-session-activation.ts
  • src/main/providers/local-pty/local-pty-session-operations.ts
  • src/main/providers/local-pty/local-pty-shell-readiness-session.ts
  • src/main/providers/local-pty/local-pty-shell-ready-bash-rcfile.ts
  • src/main/providers/local-pty/local-pty-shell-ready-marker-scan.test.ts
  • src/main/providers/local-pty/local-pty-shell-ready-marker.ts
  • src/main/providers/local-pty/local-pty-shell-ready-startup-command.test.ts
  • src/main/providers/local-pty/local-pty-shell-ready-startup-command.ts
  • src/main/providers/local-pty/local-pty-shell-ready-test-harness.ts
  • src/main/providers/local-pty/local-pty-shell-ready-wrapper-fileset.ts
  • src/main/providers/local-pty/local-pty-shell-ready-wrapper-generation.test.ts
  • src/main/providers/local-pty/local-pty-shell-ready-wrapper-generation.ts
  • src/main/providers/local-pty/local-pty-shell-ready-wrapper-root.ts
  • src/main/providers/local-pty/local-pty-shell-ready-zsh-launch-environment.test.ts
  • src/main/providers/local-pty/local-pty-shell-ready.ts
  • src/main/providers/local-pty/local-pty-shell-startup-command.node-pty.test.ts
  • src/main/providers/local-pty/local-pty-spawn-environment-wsl-background.test.ts
  • src/main/providers/local-pty/local-pty-spawn-environment.ts
  • src/main/providers/local-pty/local-pty-spawn-state.ts
  • src/main/providers/local-pty/local-pty-spawn.ts
  • src/main/providers/local-pty/local-pty-termination.ts
  • src/main/providers/local-pty/local-pty-windows-spawn-environment.ts
  • src/main/providers/startup-line-typed-length.live-shell.test.ts
  • src/main/providers/windows-shell-args.test.ts
  • src/main/providers/windows-shell-args.ts
  • src/main/providers/working-directory-validation.test.ts
  • src/main/pty/wsl-orca-env.test.ts
  • src/main/pty/wsl-orca-env.ts
  • src/main/runtime/mobile-session-dead-pty.test.ts
  • src/main/shell-startup-feature-channel.test.ts
  • src/main/ssh/plain-ssh-terminal/plain-ssh-terminal-sessions.ts
  • src/main/startup/main-process-runtime-launch-activation.test.ts
  • src/main/startup/main-process-runtime-launch.ts
  • src/main/wsl-shell-cwd-report.test.ts
  • src/main/zsh-deferred-startup-line-init.live-shell.test.ts
  • src/main/zsh-scoped-histfile.live-shell.test.ts
  • src/main/zsh-startup-hook-user-config-equivalence.live-shell.test.ts
  • tests/e2e/terminal-agent-fork-retained-prefill.test-fixture.ts
  • tests/tools/omp-close-lifecycle.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Walkthrough

The change updates Local PTY imports and test references to use the nested local-pty directory. It also removes several re-exports, separates executable-spawn imports from working-directory validation in affected tests, and updates CI paths, timing entries, and reliability-gate commands. The summaries report no runtime implementation behavior changes.

Merge Risk: Minimal · up to c5523

No merge-blocking risk was identified in the PTY relocation.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the refactor and reports validation results, but it omits most required template sections, including ELI5, What Changed, Why, Linked Issue, Visual Proof, Risk, Review, Notes, … Complete the required template sections. Add an issue link, state N/A with a reason for Visual Proof if there is no UI or interaction change, document testing platforms and steps, describe risks and rollback, address cross-platform and comp…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly describes the main change: grouping the local PTY provider and shell-readiness modules. It is concise and specific.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 50 files. (63 skipped: 5 unsupported, 58 over the file limit.)

Full details: Description check

Explanation

The description explains the refactor and reports validation results, but it omits most required template sections, including ELI5, What Changed, Why, Linked Issue, Visual Proof, Risk, Review, Notes, and the checklist.

Resolution

Complete the required template sections. Add an issue link, state N/A with a reason for Visual Proof if there is no UI or interaction change, document testing platforms and steps, describe risks and rollback, address cross-platform and compatibility considerations, complete the applicable checkboxes, and include AI Disclosure when applicable.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@nwparker
nwparker merged commit 0509a2d into main Nov 2, 2026
78 checks passed
mkjung added a commit to mkjung/orca that referenced this pull request Nov 2, 2026
Upstream stablyai#37235 moved local-pty-shell-ready-bash-rcfile.ts and
local-pty-shell-ready-wrapper-generation.test.ts into
src/main/providers/local-pty/. This PR changes both files, and GitHub
reported the PR as conflicting. Git's rename detection merges the
change into the moved files without conflict, so this merge commit has
no manual resolution. The PR's diff against main is the same two
__orca_osc133_preexec changes and their tests, now at the new paths.
Since the previous merge, the rcfile sources changed only in import
paths, and the shell blocks that they import did not change.

Validation (Node 24.18.0, Bun 1.4.4, pnpm 12.14.0, frozen-lockfile
install in the project-local layout as in CI; systemd's
80-systemd-osc-context.sh hidden in a user and mount namespace):
- the two changed test files: 68/68 pass on Bun with bash 5.3.9.
- on Node with bash 5.3.9, the six test files that use the bash rcfile
  modules, repro-13767-shell-ready-marker-lost-to-exec.test.ts and
  shell-ready.test.ts: 8 files pass (128 passed, 4 skipped).
- oxlint and oxfmt on the four PR files and pnpm tc:node pass.
- the pre-commit hook ran on the merge; oxfmt --check found no format
  change in the staged upstream files.
Not run: bash 5.0 and 4.4 (the generated script did not change since
the previous merge), full pnpm test, lint, build; macOS, Windows, SSH.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant