Repository navigation
Conversation
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬆️ High Merge Risk | ⚪ Minimal · up to
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. | |
| Linked Issues check | ❓ Inconclusive | Issue #25453 requires orca serve to become ready with a fresh HOME for the disposable pairing profile. The launch code now adds --password-store=basic and --use-mock-keychain when either E2E p… |
Provide a macOS run with the issue's fresh-HOME environment that confirms orca serve emits readiness or that the pairing runtime obtains its URL. |
✅ Passed checks (3 passed)
-
Check name Status Explanation Title check ✅ Passed The title clearly summarizes the main change: keeping isolated profiles off the login keychain during serve startup. Description check ✅ Passed The description covers the required sections, explains the change and its rationale, links issue #25453, gives a reason for N/A visual proof, and reports tests and platform coverage. It also states th…Out of Scope Changes check ✅ Passed The shared switch helper, its tests, the foreground serve launch change, and the sidecar refactor all support the #25453isolated-profile fix. The changes do not show unrelated scope.
Full details: Linked Issues check
-
Explanation
Issue
#25453requiresorca serveto become ready with a freshHOMEfor the disposable pairing profile. The launch code now adds--password-store=basicand--use-mock-keychainwhen either E2E profile variable is set. Tests cover both switches for an isolated profile and their absence for a normal profile. The reported macOS startup scenario was not run, so the evidence does not establish that the process now becomes ready.
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the full PR (5 files): moving the isolated-profile keychain switches into one shared helper and applying them to the foreground serve process.
- Shared helper —
src/shared/electron-isolated-profile-switches.tsaddsusesIsolatedProfile(eitherORCA_E2E_USER_DATA_DIRorORCA_E2E_HOME_DIR) andelectronIsolatedProfileSwitches(the two switches, or[]). - Foreground serve —
serveOrcaAppnow pushes those switches right after--serve; a normal profile gets[], so normal launches are unchanged. The update-handoff resume path reuseschildArgs, so it is covered too. - Sidecar refactor —
electron-serve-browser-process.tscalls the helper instead of the inlined condition; behaviour is identical. - Tests — new unit test for the helper (both env halves, neither, bare
HOME) plus isolated/normal cases inlaunch.test.ts; the existing sidecar assertion is unchanged.
I confirmed the load-bearing mechanism against Chromium source: --use-mock-keychain is Apple-only and short-circuits Chromium's OSCrypt to a mock keychain, which is the path Electron 43's safeStorage.isEncryptionAvailable() takes (OSCrypt::IsEncryptionAvailable() → GetEncryptionKey() → KeychainPassword::GetPassword()), so the SecItemAdd/AuthorizationCopyRights block is avoided. --password-store=basic is inert on macOS but harmless. The gate stays limited to the disposable ORCA_E2E_* profile, so a normal profile keeps its real keychain.
The author has flagged the one thing this review cannot confirm: the end-to-end repro was not run. That is a verification gap, not a code defect.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
39b3a22 to
b9aef9e
Compare
|
Rebased onto
|
The E2E/pairing runtime hands the app a fresh HOME, so there is no login keychain for OSCrypt to read. On the serve path the secret-protection report runs inline before readiness and probes safeStorage on the main thread, where Chromium's keychain lookup creates the item and waits on an authorization reply that never arrives, so `orca serve` never advertises (stablyai#25453). The sidecar already launches with --use-mock-keychain for exactly this profile; share that decision and give the foreground serve process the same switches.
b9aef9e to
53f4459
Compare
|
Rebased onto Two conflicts, both structural, no change to the fix's intent:
Net diff against Verification:
|
|
Thank you @paoValle, and for the very clear write-up. Your fix landed through #27463 (merged as 5d7f48e), with your commit and authorship kept. It also has two small follow-ups: the two new |

Author: @paolovalletta_
ELI5
pnpm start:emulatorruns Orca with a throwawayHOMEso it cannot touch your real profile. On macOS that also means there is no login keychain — and Orca's first startup step on the serve path asks macOS for its encryption key. macOS tries to create the keychain item, finds nothing to authorize it with, and waits for a reply that never comes, so the process stops there and never advertises itself.Orca already knows how to run an isolated profile without the keychain: its browser sidecar is launched with
--use-mock-keychain. The foreground serve process — the one this repro hangs in — was simply never given the same two switches. This shares that decision and applies it there too.What Changed
Before, on macOS with the pairing runtime's disposable profile:
…with the main thread parked in
SecItemAdd→AuthorizationCopyRights, andmain-thread-hang.jsonwritten after 45 s.After: the foreground serve process is launched with the switches the sidecar already carries, so nothing in an isolated profile reaches the login keychain.
Mechanism. The main-thread caller the report could not name is Orca's own secret-protection probe, and the serve path runs it inline:
startup/main-process-ready-foundation.ts:181—deferUntilFirstWindow: !state.isServeMode, so serve reports inline rather than after a window.host/deferred-secret-protection-report.ts:51— the non-deferred branch callsreportSecretProtectionGap()directly, on the main thread, before anything is advertised.host/secret-protection-report.ts:49→getSecretStore().describeProtectionGap()→host/electron-secret-store.ts:10— first statement issafeStorage.isEncryptionAvailable(). The module's own comment above it records the same class of block on Linux (76 s to first window, STA-5765).With no login keychain, Chromium's keychain lookup creates the item instead of reading it, and the creation is what waits on the authorization reply.
The switches already existed for this exact profile.
orcad/electron-serve-browser-process.tslaunches its sidecar with['--password-store=basic', '--use-mock-keychain']wheneverORCA_E2E_USER_DATA_DIR || ORCA_E2E_HOME_DIRis set, andelectron-serve-browser-process.test.tspins that. The foreground serve process is spawned by the CLI (cli/runtime/launch.ts,serveOrcaApp) and never received them, so the profile was isolated for one of its two Electron processes only.This change moves the condition into
shared/electron-isolated-profile-switches.tsand uses it at both launch sites.Why
--use-mock-keychainremoves the keychain from the process, which is why the sidecar uses it.deferred-secret-protection-report.ts: blocking after the runtime is advertised reads to a paired client as a dead host (stalled pings and PTY pumps), and the maintainers chose blocking before it. Reversing that is their call, not a drive-by change.Linked Issue
Fixes #25453
Visual Proof
N/A— no user-interface change. The observable difference is that the foreground serve process starts advertising.Testing
electron-isolated-profile-switches.test.ts(new) — either env half, neither, and a bareHOMEoverridecli/runtime/launch.test.ts— an isolated profile's serve args carry both switches; a normal profile's carry neitherchildArgs.push(...)removed- "--use-mock-keychain", so it cannot pass by constructionmain/orcad/electron-serve-browser-process.test.ts(the sidecar's pinned args, after the refactor)pnpm test src/cli/pnpm test src/main/orcad/pnpm tc(node + cli + web)oxlint+oxfmton the five files (pre-commit)Platforms tested: macOS, where the switches are inert for a normal profile. I did not run the packaged reproduction — see Notes for why, and the confirmation I would like from the reporter.
AI Disclosure
Written with an AI coding agent, session model
deepseek-v4.1-flash(provideropencode-go). All commands and results above were produced on this machine.Review
--use-mock-keychainis a macOS switch and--password-storea Linux one; the sidecar already passed both unconditionally for this profile, which is the behaviour this mirrors.HOME, and it is exactly what the sidecar already does for the same profile; a normal profile keeps its real keychain. Stated plainly because it is the one behavioural consequence beyond "it starts".Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
pnpm start:emulatorwork; making the probe itself non-blocking (or moving it off the main thread) is a separate change and I would want a steer before making it, because it is the timing decision above.AGENTS.mdforbids an agent-launched app from stealing desktop focus, so I could not honestly run it here. What I verified is the missing launch arguments and where they go. @prateek — if you can re-runnode scripts/start-emulator.mjsagainst a build of this branch, that confirms it end to end, and if it still hangs then Chromium is creating the item through a path the mock switch does not cover, which is worth knowing before this goes further.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) —tc, both affected suites,oxlintandoxfmtpass locally;pnpm lintandbuildare left to CI