Skip to content

fix terminal attribution shim removal edge cases - #14187

Merged
nwparker merged 2 commits into
mainfrom
nwparker/git-attribution-shim-removal-followup
Aug 13, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/git-attribution-shim-removal-followup

Conversation

@nwparker

@nwparker nwparker commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

The earlier attribution-shim removal deleted the generated wrappers, but terminals and daemons that survived an upgrade could still retain and execute the old git/gh wrapper path. This follow-up neutralizes that stale state and refuses terminal creation or splitting unless the connected host proves it implements the removal contract.

What Changed

  • Replaces retained git/gh wrapper paths atomically with inert pass-through tombstones so already-resolved command paths remain usable.
  • Scrubs legacy attribution environment and PATH state at local, daemon, relay, runtime, SSH, and Windows spawn owners.
  • Sends attribution-disabled environment data from CLI, desktop, web, and mobile terminal create/split callers.
  • Requires the host capability terminal.attribution-removed.v1 before protected mutations.
  • Pins protected mutations to the probed host with the additive optional expectedRuntimeId request field and rejects requests that reach a replacement runtime before dispatch.
  • Revalidates capabilities during duplicate-safe agent-session recovery without changing the operation ID or downgrading after ambiguous dispatch.
  • Removes the retired enableGitHubAttribution setting from loaded, updated, and persisted settings.
  • Forwards envToDelete through terminal.split and rejects Windows real-command paths that recurse into the wrapper directory.

The wire change is additive and optional. Older peers can ignore the field; behavior that relies on it is capability-gated. No protocol bump or new stream opcode is introduced.

Why

Deleting the shim directory alone did not cover retained panes, long-lived daemons, mixed client/host versions, runtime replacement, or ambiguous retries. Those paths could preserve stale attribution behavior or duplicate an agent launch. Compatibility tombstones, spawn-owner cleanup, capability checks, and the runtime fence close those gaps while keeping retained terminals operational.

Linked Issue

N/A — this is a follow-up to merged PR #14141; no separate issue was filed.

Visual Proof

N/A — no bespoke layout or visual component was added. The only rendered feedback uses the existing standard Sonner error toast, covered by unit tests.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Validated on exact head 636e7e58aa8002d8d9185443f068f4bdc9df37c8:

  • Changed desktop tests: 1,943 passed across 27 files.
  • Full desktop suite: 50,962 passed across 4,752 files; only the known unpinned cross-version harness selected unrelated v799.
  • Full mobile suite: 3,435 passed and 3 skipped across 437 files.
  • Shell/PTY reliability gate: 477 passed; 37 passed again with one worker.
  • Cross-version wire suite pinned to v1.4.181: 4 passed.
  • Desktop and mobile typechecks, changed-code quality, React Doctor, max-lines ratchet, reliability manifest, and git diff --check passed.
  • PR CI passed macOS, Ubuntu, and Windows native smoke; mobile verification; static analysis; typecheck; Git compatibility; shell contracts; cross-version wire compatibility; packaging including Windows; and every Node 24/26 test shard.

No physical mobile-device, live WSL/SSH mixed-version, or native cmd/PowerShell wrapper execution run was performed.

AI Disclosure

OpenAI Codex was used extensively for implementation support, test authoring, validation, and code review.

Review

  • Security and correctness: the runtime fence is enforced before one-shot or streaming handler dispatch.
  • Cross-platform: POSIX, cmd, and PowerShell compatibility wrappers and environment cleanup are covered by tests; native cmd/PowerShell wrapper execution remains a stated gap.
  • Remote, SSH, mobile, and folder workspaces: spawn-owner cleanup and fail-closed paths are covered by unit and contract tests; live mixed-version integration was not run.
  • Backwards compatibility: unsupported hosts fail before protected mutations, and the wire field is additive and optional.
  • Performance: no polling, steady-state listener, or subprocess fanout was added; retries remain bounded.

Three independent exact-SHA reviews found no P0/P1/P2 issues.

Checklist

  • This PR is small and focused
  • I explained what changed and why, including ELI5
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path impact considered
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass or are covered by CI

Author

  • X / Twitter: N/A

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: db03c128-d840-4849-8373-8ea81f466f5f

📥 Commits

Reviewing files that changed from the base of the PR and between e02dbe1d983495b5071c64076d0fc8b81e45a7b2 and 636e7e5.

📒 Files selected for processing (3)
  • src/preload/api-types.ts
  • src/preload/index.ts
  • src/renderer/src/components/terminal-pane/pty-transport.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/preload/api-types.ts
  • src/preload/index.ts
  • src/renderer/src/components/terminal-pane/pty-transport.test.ts

📝 Walkthrough

Walkthrough

The change adds compatibility checks for disabling legacy terminal attribution. Mobile, CLI, renderer, and remote session flows validate runtime capabilities before terminal creation or splitting. These flows pass attribution-disabled environment data and expected runtime identities. Runtime dispatch and subscription paths reject stale runtime identities. Legacy shim directories are neutralized with platform-specific wrappers. PTY environments remove legacy attribution variables and paths. Persistence removes retired attribution settings. Terminal split RPCs forward environment deletion requests.

Mergeability Score: 🟡 Moderate · up to 636e7

Terminal launches can still remain pending during mobile host stalls, unsupported hosts may fail without visible feedback, and a trailing-slash PATH entry can cause git or gh wrapper recursion; the related tests also have cleanup and hanging-worker risks. These bounded issues should be fixed or explicitly accepted before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed and covers the required sections, but it uses N/A for the mandatory Linked Issue field. Replace N/A with a link to the related issue or reference PR #14141 as the linked work item.
Docstring Coverage ⚠️ Warning Docstring coverage is 12.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: fixing terminal attribution shim removal edge cases.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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

Comment @coderabbitai help to get the list of available commands.

@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.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
mobile/src/session/use-mobile-diff-review-send-actions.ts (1)

112-120: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Add an end-to-end deadline to mobile terminal launch flows. Both flows use bare RPC calls for compatibility verification and terminal creation. A stalled host can leave the operation pending indefinitely.

  • mobile/src/session/use-mobile-diff-review-send-actions.ts#L112-L120: apply timeout handling before the send-sheet flow waits on terminal creation.
  • mobile/src/session/pr-ai-triage-launch.ts#L23-L27: apply the same bounded launch policy before prompt delivery.

Source: Learnings

mobile/app/h/[hostId]/session/[worktreeId].tsx (1)

3775-3785: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Show the compatibility failure for the standard create flow.

When handleCreateTerminal() has no options.errorToast, this block only updates createError. createError is visible only in the empty-session state at Line 4504. A user who already has tabs receives no update-required message after a rejected create request.

Show message in a toast for this path, or render it in the create-tab sheet.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8fe0ed4f-aa76-47a2-bdfb-c715c2bf56d1

📥 Commits

Reviewing files that changed from the base of the PR and between d3a2bf3 and e4ffa87.

📒 Files selected for processing (39)
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/src/session/ai-vault-resume-launch.test.ts
  • mobile/src/session/ai-vault-resume-launch.ts
  • mobile/src/session/ai-vault-resume-preparation.test.ts
  • mobile/src/session/mobile-terminal-attribution-compat.test.ts
  • mobile/src/session/mobile-terminal-attribution-compat.ts
  • mobile/src/session/pr-ai-triage-launch.test.ts
  • mobile/src/session/pr-ai-triage-launch.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.test.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.ts
  • src/cli/handlers/terminal.test.ts
  • src/cli/handlers/terminal.ts
  • src/cli/index.test.ts
  • src/main/daemon/pty-subprocess.test.ts
  • src/main/daemon/pty-subprocess.ts
  • src/main/index.ts
  • src/main/ipc/pty.test.ts
  • src/main/ipc/pty.ts
  • src/main/persistence.test.ts
  • src/main/persistence.ts
  • src/main/providers/local-pty-provider.test.ts
  • src/main/providers/local-pty-provider.ts
  • src/main/providers/provider-dispatch.test.ts
  • src/main/pty/legacy-terminal-shim-dir.test.ts
  • src/main/pty/legacy-terminal-shim-dir.ts
  • src/main/runtime/rpc/methods/terminal-split-env.test.ts
  • src/main/runtime/rpc/methods/terminal.ts
  • src/relay/pty-handler.test.ts
  • src/relay/pty-handler.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/lib/runtime-agent-background-create.ts
  • src/renderer/src/runtime/remote-agent-session-launch.test.ts
  • src/renderer/src/runtime/remote-agent-session-launch.ts
  • src/renderer/src/runtime/web-runtime-session.test.ts
  • src/renderer/src/runtime/web-runtime-session.ts
  • src/shared/legacy-terminal-attribution-env.test.ts
  • src/shared/legacy-terminal-attribution-env.ts
  • src/shared/protocol-version.ts

Comment thread src/cli/handlers/terminal.ts Resolved
@nwparker
nwparker force-pushed the nwparker/git-attribution-shim-removal-followup branch from e4ffa87 to 04968c6 Compare August 13, 2026 05:23
@nwparker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nwparker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/main/pty/legacy-terminal-shim-dir.test.ts (2)

33-43: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the temporary directories after each test.

Every test creates a directory with mkdtempSync and never removes it. The suite leaves at least six directories in the system temp path per run, including executable wrapper files. Track the created paths and remove them in afterEach.

♻️ Proposed cleanup
-import { spawn } from 'node:child_process'
 import {
   chmodSync,
   existsSync,
   mkdirSync,
   mkdtempSync,
   readFileSync,
+  rmSync,
   statSync,
   writeFileSync
 } from 'node:fs'
 describe('legacy terminal shim neutralization', () => {
+  const tempRoots: string[] = []
+
+  const makeUserDataDir = (): string => {
+    const dir = mkdtempSync(join(tmpdir(), 'orca-legacy-shim-'))
+    tempRoots.push(dir)
+    return dir
+  }
+
   beforeEach(() => {
     __resetLegacyTerminalShimNeutralizationForTests()
   })
 
   afterEach(() => {
     vi.useRealTimers()
+    while (tempRoots.length > 0) {
+      rmSync(tempRoots.pop() as string, { recursive: true, force: true })
+    }
   })

Then replace each mkdtempSync(join(tmpdir(), 'orca-legacy-shim-')) call with makeUserDataDir().

Note: the permission test at Lines 111-122 restores mode 0o700 in its finally block, so the cleanup can remove that directory.

Also applies to: 61-64, 79-82, 103-105, 111-116, 137-143


136-181: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Terminate the child shell if the readiness wait fails.

waitForOutput rejects when the stream ends before the marker. In that case, await ready at Line 174 throws and child.stdin.end(...) never runs. If bash is alive but produced no marker, for example when hash -p fails for another reason, the process stays attached to the open stdin pipe until Vitest tears the worker down. Add a guard that kills the child on failure.

🛡️ Proposed guard
-    await ready
+    try {
+      await ready
+    } catch (error) {
+      child.kill('SIGKILL')
+      throw error
+    }
     neutralizeLegacyTerminalShimDir(userData)

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0ba9f324-38e5-455f-a39c-1adb86a31b36

📥 Commits

Reviewing files that changed from the base of the PR and between e4ffa87 and 04968c6.

📒 Files selected for processing (66)
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/src/session/ai-vault-resume-launch.test.ts
  • mobile/src/session/ai-vault-resume-launch.ts
  • mobile/src/session/ai-vault-resume-preparation.test.ts
  • mobile/src/session/mobile-terminal-attribution-compat.test.ts
  • mobile/src/session/mobile-terminal-attribution-compat.ts
  • mobile/src/session/pr-ai-triage-launch.test.ts
  • mobile/src/session/pr-ai-triage-launch.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.test.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.ts
  • mobile/src/transport/rpc-client.ts
  • mobile/src/transport/types.ts
  • src/cli/handlers/terminal.test.ts
  • src/cli/handlers/terminal.ts
  • src/cli/index.test.ts
  • src/cli/runtime/client.ts
  • src/cli/runtime/transport.test.ts
  • src/cli/runtime/transport.ts
  • src/main/ipc/runtime-environment-connectivity-handlers.ts
  • src/main/ipc/runtime-environment-request-connections.ts
  • src/main/ipc/runtime-environment-transport-routing.ts
  • src/main/ipc/runtime-environments.test.ts
  • src/main/ipc/runtime-environments.ts
  • src/main/providers/local-pty-provider.test.ts
  • src/main/providers/local-pty-provider.ts
  • src/main/pty/legacy-terminal-shim-dir.test.ts
  • src/main/pty/legacy-terminal-shim-dir.ts
  • src/main/runtime/rpc/core.ts
  • src/main/runtime/rpc/dispatcher-computer-errors.test.ts
  • src/main/runtime/rpc/dispatcher.ts
  • src/main/runtime/rpc/streaming.test.ts
  • src/preload/api-types.ts
  • src/preload/index.ts
  • src/preload/runtime-environment-subscriptions.test.ts
  • src/preload/runtime-environment-subscriptions.ts
  • src/relay/pty-handler.ts
  • src/renderer/src/components/terminal-pane/pty-transport.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/lib/launch-agent-background-session-remote.test.ts
  • src/renderer/src/lib/runtime-agent-background-create.ts
  • src/renderer/src/lib/worktree-activation-created-agent.test.ts
  • src/renderer/src/lib/worktree-activation-empty-remote.test.ts
  • src/renderer/src/runtime/abortable-runtime-environment-call.ts
  • src/renderer/src/runtime/remote-agent-session-launch.test.ts
  • src/renderer/src/runtime/remote-agent-session-launch.ts
  • src/renderer/src/runtime/runtime-environment-authority.ts
  • src/renderer/src/runtime/runtime-rpc-client-pairing-revision.test.ts
  • src/renderer/src/runtime/runtime-rpc-client.ts
  • src/renderer/src/runtime/runtime-rpc-environment-call.test.ts
  • src/renderer/src/runtime/runtime-rpc-environment-call.ts
  • src/renderer/src/runtime/web-runtime-session.test.ts
  • src/renderer/src/runtime/web-runtime-session.ts
  • src/shared/legacy-terminal-attribution-env.test.ts
  • src/shared/legacy-terminal-attribution-env.ts
  • src/shared/remote-runtime-client.test.ts
  • src/shared/remote-runtime-client.ts
  • src/shared/remote-runtime-memory-limits.ts
  • src/shared/remote-runtime-shared-control-admission.ts
  • src/shared/remote-runtime-shared-control-connection.ts
  • src/shared/remote-runtime-shared-control-send.ts
  • src/shared/remote-runtime-shared-control-subscription-start.ts
  • src/shared/remote-runtime-shared-control-subscriptions.test.ts
  • src/shared/remote-runtime-shared-control-subscriptions.ts
  • src/shared/remote-runtime-shared-control-types.ts
  • src/shared/runtime-rpc-envelope.ts
🚧 Files skipped from review as they are similar to previous changes (18)
  • mobile/src/session/pr-ai-triage-launch.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.ts
  • src/main/providers/local-pty-provider.ts
  • mobile/src/session/pr-ai-triage-launch.test.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.test.ts
  • src/cli/handlers/terminal.ts
  • mobile/src/session/ai-vault-resume-launch.ts
  • src/shared/legacy-terminal-attribution-env.test.ts
  • mobile/src/session/ai-vault-resume-launch.test.ts
  • mobile/src/session/ai-vault-resume-preparation.test.ts
  • mobile/src/session/mobile-terminal-attribution-compat.test.ts
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • src/relay/pty-handler.ts
  • src/main/providers/local-pty-provider.test.ts
  • src/renderer/src/runtime/web-runtime-session.ts
  • src/cli/index.test.ts
  • src/renderer/src/runtime/web-runtime-session.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts

Comment on lines +50 to +55
remove_path_entry "$legacy_wrapper_dir"
remove_path_entry "$wrapper_dir"
unset ORCA_ENABLE_GIT_ATTRIBUTION ORCA_GIT_COMMIT_TRAILER ORCA_GH_PR_FOOTER
unset ORCA_GH_ISSUE_FOOTER ORCA_ATTRIBUTION_SHIM_DIR ORCA_REAL_GIT ORCA_REAL_GH ORCA_ATTRIBUTION_BYPASS

real_command="$(PATH="$cleaned_path" type -P "$command_name" || true)"

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Normalize POSIX PATH entries before command lookup.

Line 51 removes only the exact $wrapper_dir value. A PATH entry with a trailing slash remains. Line 55 can resolve this wrapper again, and Line 60 then starts an infinite wrapper recursion.

Remove trailing separators when comparing PATH entries. Add a wrapper execution test with a posix/ PATH entry.

Proposed fix
 remove_path_entry "$legacy_wrapper_dir"
 remove_path_entry "$wrapper_dir"
+remove_path_entry "${legacy_wrapper_dir%/}/"
+remove_path_entry "${wrapper_dir%/}/"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
remove_path_entry "$legacy_wrapper_dir"
remove_path_entry "$wrapper_dir"
unset ORCA_ENABLE_GIT_ATTRIBUTION ORCA_GIT_COMMIT_TRAILER ORCA_GH_PR_FOOTER
unset ORCA_GH_ISSUE_FOOTER ORCA_ATTRIBUTION_SHIM_DIR ORCA_REAL_GIT ORCA_REAL_GH ORCA_ATTRIBUTION_BYPASS
real_command="$(PATH="$cleaned_path" type -P "$command_name" || true)"
remove_path_entry "$legacy_wrapper_dir"
remove_path_entry "$wrapper_dir"
remove_path_entry "${legacy_wrapper_dir%/}/"
remove_path_entry "${wrapper_dir%/}/"
unset ORCA_ENABLE_GIT_ATTRIBUTION ORCA_GIT_COMMIT_TRAILER ORCA_GH_PR_FOOTER
unset ORCA_GH_ISSUE_FOOTER ORCA_ATTRIBUTION_SHIM_DIR ORCA_REAL_GIT ORCA_REAL_GH ORCA_ATTRIBUTION_BYPASS
real_command="$(PATH="$cleaned_path" type -P "$command_name" || true)"

@nwparker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nwparker
nwparker force-pushed the nwparker/git-attribution-shim-removal-followup branch from e02dbe1 to 636e7e5 Compare August 13, 2026 06:12
@nwparker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nwparker
nwparker merged commit 585dd6d into main Aug 13, 2026
93 of 95 checks passed
nwparker added a commit that referenced this pull request Aug 13, 2026
This reverts 585dd6d. Re-landed in the next commit without the host capability gate. Nothing shipped with it, so no migration constraint.
nwparker added a commit that referenced this pull request Aug 13, 2026
Re-lands the cleanup half of #14187: pass-through tombstones for retained wrapper paths, env/PATH scrubbing at every spawn owner, and the retired setting drop.

Only writes tombstones when the legacy directory already exists, so a clean install no longer has it created. Leaves out the terminal.attribution-removed.v1 capability gate: the tombstone neutralizes each host locally, so refusing terminal create/split against older hosts denied service without adding cleanup.
nwparker added a commit that referenced this pull request Aug 13, 2026
The revert took a toast that #14187 added alongside the gate but which stands on its own: without it a failed remote split only reaches the console and the pane silently never appears. Also pins attempt ordinals in the retry-exhaustion test.
nwparker added a commit that referenced this pull request Aug 13, 2026
* Revert "fix terminal attribution shim removal edge cases (#14187)"

This reverts 585dd6d. Re-landed in the next commit without the host capability gate. Nothing shipped with it, so no migration constraint.

* rm git shim: neutralize stale wrappers without a host gate

Re-lands the cleanup half of #14187: pass-through tombstones for retained wrapper paths, env/PATH scrubbing at every spawn owner, and the retired setting drop.

Only writes tombstones when the legacy directory already exists, so a clean install no longer has it created. Leaves out the terminal.attribution-removed.v1 capability gate: the tombstone neutralizes each host locally, so refusing terminal create/split against older hosts denied service without adding cleanup.

* rm git shim: surface neutralization failures and fix rollback marker

Readiness review follow-ups: warn on each failed attempt and on give-up (was silent and undiagnosable); write a VERSION marker distinct from the retired shim's '7' so a rolled-back build rewrites its own wrappers; clear a captured ORCA_REAL_* path that no longer exists so the cmd wrapper's where.exe fallback can run; stop a locked temp file masking the real error. Adds retry-exhaustion coverage.

* rm git shim: pin the cmd fallback order and correct the give-up count

Round-2 review follow-ups: string-pin that a stale ORCA_REAL_* is cleared before the where.exe fallback, and count the initial attempt in the give-up warning so it agrees with the per-attempt line.

* rm git shim: keep the split-failure toast

The revert took a toast that #14187 added alongside the gate but which stands on its own: without it a failed remote split only reaches the console and the pane silently never appears. Also pins attempt ordinals in the retry-exhaustion test.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix(terminal): fully retire attribution shim

* fix(terminal): harden shim tombstone path lookup
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…14255)

* Revert "fix terminal attribution shim removal edge cases (stablyai#14187)"

This reverts 35969c5. Re-landed in the next commit without the host capability gate. Nothing shipped with it, so no migration constraint.

* rm git shim: neutralize stale wrappers without a host gate

Re-lands the cleanup half of stablyai#14187: pass-through tombstones for retained wrapper paths, env/PATH scrubbing at every spawn owner, and the retired setting drop.

Only writes tombstones when the legacy directory already exists, so a clean install no longer has it created. Leaves out the terminal.attribution-removed.v1 capability gate: the tombstone neutralizes each host locally, so refusing terminal create/split against older hosts denied service without adding cleanup.

* rm git shim: surface neutralization failures and fix rollback marker

Readiness review follow-ups: warn on each failed attempt and on give-up (was silent and undiagnosable); write a VERSION marker distinct from the retired shim's '7' so a rolled-back build rewrites its own wrappers; clear a captured ORCA_REAL_* path that no longer exists so the cmd wrapper's where.exe fallback can run; stop a locked temp file masking the real error. Adds retry-exhaustion coverage.

* rm git shim: pin the cmd fallback order and correct the give-up count

Round-2 review follow-ups: string-pin that a stale ORCA_REAL_* is cleared before the where.exe fallback, and count the initial attempt in the give-up warning so it agrees with the per-attempt line.

* rm git shim: keep the split-failure toast

The revert took a toast that stablyai#14187 added alongside the gate but which stands on its own: without it a failed remote split only reaches the console and the pane silently never appears. Also pins attempt ordinals in the retry-exhaustion test.
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