Repository navigation
fix(settings): load Windows profiles with malformed shell values - #28217
brennanb2025 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
|
Closing. A real-Windows repro showed this guard doesn't change the outcome: with a non-text saved Windows shell, Orca already fails to start before #28100 (the startup shell PATH setup trims the same value), and with this PR it fails one step later in the same way. Nothing in Orca writes a non-text value, so it needs a hand-edited or corrupted settings file. Not pursuing for now. |
ELI5
After #28100, a Windows profile with an invalid saved shell value could fail to load if it had no saved chat permission choice. These profiles now load successfully and use the normal PowerShell family when choosing their initial chat permission setting.
What Changed
Check that the saved Windows shell is a string before passing it to chat permission seeding. Valid strings, including custom executable paths, pass through unchanged; other values use the existing shell default. Saved permission choices, migrated arguments, and the requirement that both Claude and Codex bypass approvals keep their current behavior.
Why
Persisted profile data can contain values outside the declared type. Checking this value where it enters permission seeding prevents the settings-load failure while keeping the existing shell resolver and default.
Linked Issue
Follow-up to #28100; addresses review finding R28100-READY-01.
Visual Proof
N/A — this is a settings-loading guard with no interface change.
Testing
Tests ran on macOS with the Windows platform simulated. The new normalization cases reproduced eight
shell?.trim is not a functionfailures before the guard. With the guard, all 116 targeted tests passed across settings normalization, chat permissions, and launch arguments; the realpnpm tc:nodealso passed. The cases cover malformed values, default quoting, shell-specific quoting and custom paths, saved permission choices, both agents, and arguments after migration.orca-ci-checks --no-typecheck: 22/23 passed. The only failure was the known local Bun tooling error,Script not found "check"; the real node typecheck passed separately. Native Windows confirmation is being coordinated separately.Review
Self-reviewed the two-file diff. No shell parser, permission-config, or interface changes.
Agent skill upstream boundary
Notes
The existing host-side settings path handles the guard. There are no transport or remote wire changes. This prevents permission seeding from failing; it does not repair the malformed stored shell value or change later terminal launches.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)CI covers the remaining projects and build checks.