Repository navigation
Conversation
Desktop can open the installed Google Chrome on a separate, Desktop-managed profile after the person agrees to an engine-served notice. They sign in once (SSO or two-factor as usual) and Chrome keeps the sign-ins; recordings and runs attach through the existing browser_cdp_endpoint contract. Fail closed on a changed notice, a default Chrome folder, a profile already open elsewhere, a Chrome that hands off and exits, or an endpoint that doesn't name the process Desktop started. Close only that process (Browser.close, then the handle). No cookie, password or keychain access.
Chrome restarts itself without admin rights when started elevated, so the handle Desktop holds exits and the window can't be verified or closed by it. Refuse before launch. Never probe a pid with os.kill on Windows. Adds the Windows lab run and the CAPABILITIES row.
Spawn through child_process.popen (no new session, which would fork the engine). Move the Chrome profile handlers into chrome_profile.py; dispatch.py gains two lines, and its budget row rises by those two.
bf25be6 to
b498f94
Compare
On a cold macOS runner /json/version timed out right after Chrome wrote DevToolsActivePort. Retry an unreachable server until the start timeout; an endpoint that answers for another browser is still refused at once.
Independent adversarial review: APPROVEFrom: Grok I will not merge. Author is abrichr, not Grok. No prior Grok verdict at this head. I did not review The requested checks hold:
Tests cover those refusals, the retry rule, close ownership, the window-only allowlist, and the elevated-Windows path. I will not merge. This head is MERGEABLE/BLOCKED; the author asked to wait for a Desktop version bump, and |
Independent adversarial review: APPROVEFrom: Grok Review only. I am not merging, tagging, publishing, dispatching, or rerunning The new work is a merge of current Merging this PR auto-publishes Merge-order note (not a blocker of this PR's own tree): OpenAdapt#2305 also stamps desktop 0.32.0, with a different unique tree (shared theme roles). I approve this head. I am not merging it. |
# Conflicts: # packages/desktop/CHANGELOG.md # packages/desktop/openadapt_desktop/__init__.py # packages/desktop/package-lock.json # packages/desktop/package.json # packages/desktop/pyproject.toml # packages/desktop/src-tauri/Cargo.lock # packages/desktop/src-tauri/Cargo.toml # packages/desktop/src-tauri/tauri.conf.json # packages/desktop/uv.lock
Desktop can open the installed Google Chrome on a separate, Desktop-managed profile after the person agrees to an engine-served notice (SHA-256 acknowledged, re-asked when it changes, revocable with delete). The person signs in once (SSO or two-factor as usual); Chrome keeps the sign-ins, and recordings and runs attach through the existing
browser_cdp_endpointcontract.Mechanism and why: see
packages/desktop/docs/CHROME_PROFILE.md. Chrome ignores remote debugging on its default profile; copying a profile exports its cookie and password stores (and needs the macOS keychain); an extension plus native messaging adds a per-OS host and store or policy install for no extra reach.Fail closed (codes in the doc): changed or missing consent, Chrome's own profile folders, a profile already open (
SingletonLock/lockfile), a Chrome that hands off and exits, an elevated Windows Desktop (Chrome restarts itself de-elevated, so the handle is lost), or a/json/versionthat doesn't name the browser ID Desktop read fromDevToolsActivePorton loopback.Close only what Desktop opened:
Browser.closeto that process's verified endpoint, then the Popen handle; never by name. Engine exit closes owned windows.Never: cookie or password reads, keychain calls or keychain flags (static test). Only official Google Chrome; Chrome for Testing and Chromium are refused. Commands are window-only (not on the tray or agent socket; tested). Does not touch
authoring_runner.py(#2259 owns it; that path stays empty-cookie).Tests: fakes-only unit tests (
test_chrome_profile.py), vitest for the picker, and a real-Chrome test (test_chrome_profile_real.py,OPENADAPT_REAL_CHROME=1) in a newReal Chrome profilejob on GitHub macOS and Windows runners, and on the Windows lab without admin rights.