Add one workspace sign-in to Agent Native Desktop#2290
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Here's a visual recap of what changed: Open the full interactive recap |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Builder reviewed your changes and found 1 potential issue 🔴
Review Details
Incremental Code Review Summary
The latest revision addresses all four previously reported issues: automatic sign-in is suppressed after workspace sign-out, ceremony generations invalidate queued and in-flight work, active cookie-copy operations are drained before clearing sessions, the canary now builds branding/native/extension resources, and Settings starts sign-in from an opted-in canonical target rather than Dispatch itself. I verified those fixes in the current source and resolved the four stale review threads.
Risk: High, because this remains authentication/session lifecycle code and release packaging. The updated broker now has substantially safer ordering and regression coverage, and the Dispatch primary-auth public-path consolidation remains sound.
New Finding
- 🔴 HIGH — The Desktop web-request interceptor cancels both ordinary logout and
logout-all. This prevents the server-side all-session revocation from running, so a user selecting “sign out everywhere” in a canonical app can remain authenticated in other browsers/devices. Only ordinary local logout should be intercepted, or the revocation must be performed before local cleanup.
🧪 Browser testing: Blocked — the dev server was healthy, but Chrome DevTools MCP remained unreachable across executor retries; the Electron-only flows are not browser-served.
Land audit — no-go packetPassed: Exact-head required CI is green; the signed/notarized macOS artifact is bound to Missing acceptance evidence: The canary browser had no authenticated Dispatch identity, so it did not prove same-account Mail session completion and correct existing data, restart persistence, workspace sign-out/logout-all, account switch, cancellation/concurrency, standalone-browser locality, custom/local exclusions, or the frozen hostile/replay/cookie/partition matrix. The canary also exposed an unexpected Feature flags: No generic feature flag was shaped. The risk strategy is Repository governance: satisfied Independent technical review: evidenced Acceptance story: not satisfied Merge permitted: no Enablement permitted: no May call shipped: no Task may close: no Readiness: blocked Exact unblock: provision or use a safe authenticated Dispatch test identity, suppress or explicitly control updater replacement of the branch canary, rerun the short locked canonical-origin canary on an exact signed artifact, and pass the complete frozen installed-app acceptance matrix. Alice has also explicitly instructed that this pass must not merge. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Work update — exact-head canary ready, production window not openedCurrent PR head: Verified:
Prepared exact-head Netlify candidates:
Both are still Authenticated acceptance is still blocked because normal Chrome is logged out of The production window must remain closed until both candidates are ready and a safe Dispatch session is available. Then capture the current production deploy IDs, lock auto-publishing, promote Dispatch then Mail, run the frozen authenticated matrix, restore production in reverse order, unlock, and verify rollback. Do not merge before that acceptance result. Separate observation: native Quit again stalled during disposable canary cleanup. Evidence points to the pre-existing Desktop quit-lifecycle guard, not this SSO/updater change; restart and updater acceptance both passed. |

Problem
Agent Native Desktop opens first-party apps in isolated browser sessions. That isolation currently also makes people sign in to each app separately, even though they are using one Desktop workspace. The result is repetitive setup and inconsistent account and sign-out behavior.
This must improve without silently joining standalone browsers, custom apps, local development, or Builder credentials to a Desktop-wide session.
Approach
Use Dispatch as the Desktop workspace identity authority. One browser ceremony establishes the workspace identity; each explicitly trusted Agent Native app then exchanges a short-lived signed handoff for its own normal app session. Desktop keeps those sessions isolated and never exposes credentials to renderer code.
Trust is intentionally narrow: exact canonical first-party HTTPS origins only. Mail is the first production canary, not evidence that the whole app fleet is enabled.
What changed
/logoutand/logout-allserver behavior while Desktop observes completion, carries authenticated revocation through cleanup, monotonically upgrades to logout-all, drains all cleanup targets, and reports partial failure truthfully.-desktop-sso-canary.Nversion family so acceptance cannot silently replace the candidate with a stable release. Stable and unrelated prerelease behavior is unchanged.Safety and operations
.github/workflows/desktop-release.ymland the shared stable update feed are unchanged..github/workflows/desktop-canary.ymlruns only forcodex/desktop-workspace-sso; it creates no tag, release, updater publication, Windows build, or Linux build.Current exact-head evidence
Evidence on
0ab3d3bfff85b4f45b0a6da0ac7d319c78faeb2d:d2a3919.desktop-sso-canary-0ab3d3bfff85b4f45b0a6da0ac7d319c78faeb2didentifies version0.1.150-desktop-sso-canary.8and bundle IDcom.agentnative.desktop; all four SHA-256 checksums recomputed exactly.Developer ID Application: Builder.io, Inc (W3PMF2T3MW)..8canary version, disabled updater controls, a 100-second focused dwell, one restart, and no canary-attributed feed request, update offer, download, or install.6a628128c2584d0009701a9eand Dispatch deploy6a628128cf5ee90008f8741eare pinned to the exact commit and still queued in Netlify because the team is using all 3/3 concurrent build slots. Neither has been published.Prior controlled production canary
The prior-head ceremony proved canonical Mail-to-Dispatch routing, callback/state construction, hostile-callback rejection, and safe reverse-order rollback. The exact signed Desktop app reached production Dispatch, but normal Chrome had no authenticated Dispatch identity, so authenticated completion could not run.
Production remains restored to the prior baseline; auto-publishing is on for both Mail and Dispatch. No current-head deploy has been promoted.
Remaining acceptance gate
Do not merge on the basis of the partial canary. A fresh short ceremony still needs:
The updater acceptance gate is now satisfied. A separate pre-existing Desktop quit-lifecycle guard required forced cleanup during tester disposal; available evidence does not attribute that behavior to this SSO or updater change.
Review focus