Repository navigation
fix(pty): restore macOS TCC attribution persistence - #12562
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughmacOS TCC shell wrapping now uses a positional Bash trampoline that preserves 🚥 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 |
Replace the env intermediary with a clean bash trampoline that execs the configured shell as a login shell. Keep SHELL, custom arguments, fallback shells, and unsafe characters positional.
Record wrapped versus direct daemon PTY strategy without private values so live TCC reports can distinguish launch behavior.
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Maintainer review complete. I confirmed the repeated macOS AppData prompt is caused by Orca TCC attribution—not normal 1Password CLI authorization or the reporter’s setup—and pushed the reviewed branch rebased onto current Review hardening added:
Validation is clean: two independent review lanes, full typecheck and lint, 161 focused tests passed with only the two known deleted-cwd host cases skipped, and Electron QA with two fresh terminals. Both terminals had |
|
Follow-up review complete.
No additional UI screenshot was taken because this follow-up is nonvisual and Electron QA was skipped. |
|
Thanks for the PR! |
thanks for the super prompt review and merge! |
* fix(pty): restore macOS login shell attribution Replace the env intermediary with a clean bash trampoline that execs the configured shell as a login shell. Keep SHELL, custom arguments, fallback shells, and unsafe characters positional. * chore(pty): log macOS TCC spawn strategy Record wrapped versus direct daemon PTY strategy without private values so live TCC reports can distinguish launch behavior. * fix(pty): harden macOS TCC login trampoline * test(pty): update macOS TCC spawn expectation --------- Co-authored-by: Brennan Benson <[email protected]>

Summary
login -> env -> shellchain with a clean Bash trampoline thatexec -ls the configured shell, matching the working Ghostty launch shape.SHELL, shell paths, and all shell arguments positionally without interpolation.macos-tcc-pty-spawndaemon event withwrappedordirectstrategy for live diagnosis.Fixes #8985.
Screenshots
No visual change.
Testing
pnpm lint— full repository lint not run; focused oxlint passed with denied warnings.pnpm typecheck— full typecheck not run;pnpm run typecheck:nodepassed.pnpm test— full suite not run; focused Vitest passed: 3 files, 160 tests.pnpm build— full production build not run; isolated development Electron build launched successfully.Focused tests cover exact argv, custom/fallback shells, spaces, equals signs, disabled and non-macOS paths, preflight degradation, and spawn-strategy reporting.
Live macOS verification on the affected host:
macos-tcc-pty-spawnwithstrategy=wrapped.login -> bash --noprofile --norc -> exec -l zsh;SHELL, cwd, and login argv were preserved.op vault listinvocation prompted once and exited 0 after approval.AUTHREQ_PROMPTINGevent.tccdreturned an allowed persisted decision for both later processes.AI Review Report
Reviewed every local user-terminal node-pty route: daemon primary, local primary, and Unix fallback. All continue through the centralized macOS wrapper after shell fallback resolution. Checked preflight fail-open behavior, positional argument safety, login-shell semantics, and daemon diagnostic privacy.
Cross-platform review confirmed that the wrapper and diagnostic wiring are macOS-gated; Linux and Windows retain direct spawning. No keyboard, UI label, provider, SSH, folder-workspace, path-separator, or Electron menu behavior changed.
Security Audit
SHELL, and arguments are positional parameters; no user-controlled value is interpolated into Bash source.exec -l "$@".wrappedordirect; it does not log usernames, shell paths, cwd, environment values, arguments, or terminal contents.Notes
The behavior is macOS-specific. The live gate used the isolated
com.stablyai.orca.devbuild and verified persistence across both a newopprocess and a new PTY on macOS 26.5.1 with 1Password CLI 2.38.1.