Skip to content

fix(desktop): ask before a connect link pairs this computer - #2780

Merged
abrichr merged 9 commits into
mainfrom
fix/desktop-connect-link-confirm
Nov 30, 2026
Merged

abrichr merged 9 commits into
mainfrom
fix/desktop-connect-link-confirm

Conversation

@abrichr

@abrichr abrichr commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Blocked on Cloud

Cloud ships first; this PR merges after it. Until Cloud answers with the fields below, Desktop revokes every connect-link claim. Browser sign-in from Desktop is unaffected.

With today's Cloud answer, Desktop revokes the claim, keeps its current connection, and shows:

OpenAdapt Cloud didn't say which workspace this link belongs to, so Desktop cancelled it and kept its current connection. Nothing changed.

Contract for POST /api/local-bridge/pairings/claim

Request. Desktop already sends this JSON body. Cloud ignores unknown request fields today, so it is safe now.

Field Type Value
pairing_secret string the one-use oap_… code from the link
device_name string this computer's name
include_identity boolean, always true from Desktop 0.35.1 asks for the two blocks below

Response when include_identity is true (status 201 as today, which Desktop requires; Cache-Control: no-store as today). The existing five keys stay as they are, and two keys are added:

Field Type Value
workspace object required
workspace.id string, canonical lowercase UUID (8-4-4-4-12) orgs.id for the pairing row's org_id
workspace.name string, non-empty orgs.name
account object or null the person who created the pairing code
account.email string containing @ that user's email
{
  "paired": true,
  "pairing_id": "…",
  "ingest_token_id": "…",
  "ingest_token": "oai_ingest_…",
  "credential": { "…": "unchanged" },
  "workspace": { "id": "6f9d2c1e-0b7a-4c3e-9a51-2d8f4b6e7a10", "name": "Northside Clinic" },
  "account": { "email": "pat@example.com" }
}

Rules Cloud must keep:

  • Without include_identity: true, the response keeps exactly the five keys paired, pairing_id, ingest_token_id, ingest_token and credential. Released Desktops abort a claim with any extra key, and openadapt login uses the same route.
  • Look up the names only after the atomic claim succeeds, so only the holder of the one-use code sees them. A 410 for a used or expired code, or any other error, reveals no names.
  • No other new top-level keys. Desktop refuses any extra key besides workspace and account.

What Desktop does with it.

  • A workspace counts only with both a UUID id and a non-empty name. Without one, Desktop revokes the claim as above.
  • Desktop compares workspaces by id. It removes control and bidi characters from names and caps them at 120 characters.
  • account may be missing or null. The dialog then shows no email.

The problem

An openadapt://connect?pairing=oap_…&host=… link used to redeem its pairing code as soon as the operating system delivered it. Anyone can create a pairing code in their own workspace on app.openadapt.ai and put it in a link. One click could move a Desktop to that workspace, and the host on screen is app.openadapt.ai either way.

What changed

Step 1: Allow (link → claim)

  • connect_uri only stages the request in engine memory. It sends nothing to Cloud, writes nothing to the keychain and leaves the config alone. The staged code expires after 5 minutes, which is Cloud's code lifetime.
  • The window shows the host. If the computer is already paired, it says the current connection stays unless the person later chooses Switch.
  • pairing_allow must carry the request id the window showed, and works once.

Step 2: Switch or Keep (claim → active)

  • pairing_allow claims the code and checks the new credential. It asks Cloud for names with include_identity: true.
  • The new credential is held in memory only. Nothing is staged in the keychain, hosted_host doesn't change, and the review never runs crash recovery, which would otherwise make an unfinished earlier connection active.
  • The window names the workspace and account Cloud reported, and the current workspace. It offers Switch to and Keep (or "Keep current connection" / "Don't connect").
  • pairing_switch (with the shown request id) is the only path to the active credential. It runs the existing stage, validate, commit and confirm path with rollback. It then records paired_workspace_id and paired_workspace_name, so the next link can name the current workspace. Pairings made before this change show "a workspace OpenAdapt didn't record".
  • Keep or Switch after the 90-second review deadline revoke the claim through Cloud's abort route. A restart drops the claim, and Cloud revokes it after 2 minutes unconfirmed. The deadline sits well inside that window, so Switch never stages a claim Cloud has already revoked.
  • Workspaces are compared by id, because whoever creates the code chooses the name. When the link's workspace is a different id but has the current workspace's name (compared after Unicode NFKC, case and whitespace folding), the dialog says "This is a different workspace that is also named ."
  • Both buttons carry the first 8 characters of the workspace id, and Switch also carries the account email: Switch to Acme (ops@example.com, ID 22222222) and Keep Acme (ID 11111111). Two workspaces with lookalike names that the folding misses still show different ids.
  • No workspace in Cloud's answer: Desktop revokes the claim, keeps the current connection and shows an error.

Two different links never swap the question. If a second, different link arrives while a request waits for Allow or Switch, Desktop drops both, revokes any claim, and shows "Two different connect links arrived. Nothing changed. Open the link you created again." (After Allow the first code is spent, so that message asks for a new connection from Cloud settings instead.) The same link delivered twice, which launch and single-instance can both do, keeps the question on screen. A link can still cancel a pending request, but it can't take the place of the one the person is reading.

A link that arrives after that conflict asks a fresh question, and nothing can tell it from the person's own link opened again. So for 5 minutes after a conflict, the Allow and Switch questions add "Two different connect links arrived a moment ago. Continue only if you just opened your own link again." The real check stays at Switch, which names the workspace by id and the account by email.

Stale workspace names. Browser sign-in, token sign-in and sign-out clear paired_workspace_id and paired_workspace_name, so a later dialog can't offer to keep a workspace this computer no longer uses. Two paths still don't clear them: crash recovery finishing an interrupted Switch, and openadapt login run outside Desktop. The worst case there is a dialog naming the old workspace, and the ids on the buttons still differ.

Where the code lives. The confirmation steps are in a new module, openadapt_desktop/pairing_confirm.py. Its PairingConfirmation class holds the staged link and the reviewed claim. dispatch.py registers the handlers in one line, as it does for Chrome profiles. It drops to 6501 lines (main: 6520), and its size budget in DECOMPOSITION.md drops from 6524 to 6501. The sign-in clearing lives in pairing_confirm.py too. The earlier ci and smoke failures were this PR's: the size ratchet runs first in the smoke job, and dispatch.py was 6792 lines. Smoke passes on other recent PRs (#2782, #2779, #2778).

Window only. pairing_status, pairing_allow, pairing_switch, pairing_keep and pairing_deny are outside the loopback socket's command list, so the tray and local agents can't send them. Neither the code nor the new bearer ever appears in an event.

Host allowlist

  • app.openadapt.ai is always accepted.
  • A Cloud server on this computer needs the developer setting allow_local_pairing, set with OPENADAPT_ALLOW_LOCAL_PAIRING or in config.toml. Neither a link nor set_config can turn it on.
  • Every other host was already refused, and still is.
  • This is stricter than "production plus configured dev hosts": the keychain recovery path only accepts production or loopback anyway.
  • Behaviour change: local Cloud pairing links need allow_local_pairing.

No shell permission for the window. capabilities/default.json drops shell:allow-execute and shell:allow-spawn on the engine sidecar. Rust starts the sidecar in sidecar.rs, and no frontend code uses the shell plugin.

Version: Desktop 0.35.1.

Tests

Engine tests run the real pairing code against a fake Cloud and keychain:

  • A link without Allow redeems nothing.
  • After Allow, an already-paired Desktop keeps its credential until Switch, with no stage record.
  • Keep revokes the claim and leaves the keychain unchanged.
  • A claim that names no workspace revokes and keeps the current connection.
  • A restart during review leaves the keychain unchanged.
  • Switch after the deadline revokes. Workspaces match by id, and a different workspace with the same folded name is flagged as same_name.
  • A second, different link drops both requests (before and after Allow) and revokes the claim. The same link twice keeps the question, and an expired request doesn't block a new link.
  • A link fired again after a conflict gets a fresh question marked after_conflict, through to Switch.
  • Browser sign-in, token sign-in and sign-out clear the recorded workspace in memory and in config.toml.
  • Every test now points OPENADAPT_CONFIG_TOML at a temporary file. Before this, test_login_paste wrote the developer's real ~/.openadapt/config.toml.
  • Wrong or missing request ids are refused, and the commands are refused on the socket.

Phase-one unit tests (claim_for_review):

  • The exact request body.
  • Nothing is written to the keychain.
  • Extra keys are refused.
  • Crash recovery is never run.
  • Names are cleaned.

Static checks:

  • The review and Allow code contain no keychain-write calls.
  • Rust never sends Allow, Switch or Keep.
  • No capability file grants a shell: permission.

Frontend tests: both dialogs, the button labels, a different workspace named like the current one ("Acme" and "Acme"), a link while the app is open, the two-links error replacing the dialog, and Keep.

Run locally on macOS, headless only:

Suite Result
vitest 443 passed
tsc clean
cargo test (Rust unchanged since the first push) 26 passed
ruff check clean
check_release_intent.py and check_release_consistency.py consistent
check_file_size_ratchet.py --base origin/main passes
pytest tests/ 2180 passed, 2 failed, 63 skipped

The 2 pytest failures also fail on main (Grok saw the same on Linux):

  • test_control_overlay_contract_sync: the virtual environment has openadapt-types 0.24.0, and the test wants 0.24.2.
  • test_dry_run::test_complete_dry_evidence_projects_codes_without_values.

The run left ~/.openadapt/config.toml unchanged.

The dialogs were not tried in a running app. The Native installer job, which runs the release Rust tests and the macOS launch smoke test, is skipped by this PR's path selection, so nothing in CI has shown the window still starts without the shell permission.

An openadapt://connect link used to redeem its pairing code as soon as the
operating system delivered it. Anyone can create a pairing code and put it in
a link, so one click could move a Desktop to another Cloud workspace.

A connect link now only stages the request in the engine. The window shows
the target host, says when the link would replace the current pairing (also
on the same host, since that can still be another workspace), and redeems
nothing until the person clicks Allow. Allow carries the request id the
window showed, so a second link that arrives before the click can't be
allowed by it. The staged code stays in engine memory, expires after ten
minutes, and is used at most once. Cloud has no way to look up a code without
redeeming it, so the dialog says the workspace isn't known yet.

The engine now refuses connect links for a Cloud server on this computer
unless the developer setting allow_local_pairing is on (env
OPENADAPT_ALLOW_LOCAL_PAIRING or config.toml). Links for app.openadapt.ai are
unchanged; every other host was already refused.

The main window no longer has shell execute or spawn permission on the
engine sidecar. Rust starts the sidecar itself and no frontend code used the
shell plugin.
Test the dialog for a link that arrives while the app is open, that the
loopback socket can't send Allow, and that the window can't turn on local
pairing. Drop an unused countdown field from the prompt and update the
installer doc.
Allow on a connect link no longer makes the new connection active. An
attacker's code for their own workspace also names app.openadapt.ai, so the
host alone can't tell the person anything.

Allow now claims the code and checks the new credential without writing it
to the keychain or changing the Cloud host. The window then names the
workspace and account Cloud reported and the current workspace, with
"Switch to <workspace>" and "Keep <current>". Only Switch stages and commits
the credential (the existing rollback path). Keep, a 90-second timeout, a new
link or a restart revokes or drops it; Cloud also revokes a claim nobody
confirms within two minutes. Workspaces are compared by id, since whoever
makes the code chooses the name.

If Cloud's answer names no workspace, Desktop revokes the claim, keeps its
current connection and shows an error. Desktop asks for the names with
include_identity in the claim request; Cloud doesn't send them yet, so until
it does every connect link ends with that error. Signing in from Desktop is
unaffected.
The Allow and Switch/Keep steps for openadapt:// connect links now live in
openadapt_desktop/pairing_confirm.py, one class that holds the staged link and
the reviewed claim. dispatch.py registers its handlers in one line, as it does
for Chrome profiles, and drops to 6502 lines; its size budget drops to match.
@abrichr

abrichr commented Nov 30, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Grok
Reviewed-Head: ef43ba4

I started on 7bb9d2ca6 and moved to this head when it landed. The two-phase design is a real improvement:

  • A link alone reaches nothing.
  • Allow claims for review only, with no keychain write.
  • Switch is the only path to an active credential.
  • The file-size ratchet now passes (dispatch.py is 6502 lines, budget lowered to match).

One gap defeats the stated defense, though: a code's creator chooses the workspace name, and the Switch dialog shows only names.

Blocking

1. A same-name workspace looks the same in the Switch dialog. The id comparison barely reaches the person.

  • _switch_prompt compares workspaces by id (pairing_confirm.py:244-247).
  • The UI uses that result only to pick between two near-identical sentences. The buttons are name-only (PairingConfirm.tsx:97-117, :136).
  • Probe (a vitest I wrote, not in the PR): the current workspace is {id: 1111…, name: "Acme"} and the link's workspace is {id: 2222…, name: "Acme"}, so same_workspace: false. switchQuestion and keepLabel return:
    • Different workspace: "This link connects this computer to the workspace Acme as ops@example.com on app.openadapt.ai. This computer is connected to Acme. Switching replaces that connection. Switch only if this is the workspace you meant." Buttons: Switch to Acme / Keep Acme.
    • Genuinely the same workspace: "…to the workspace Acme… This computer already uses Acme; switching replaces its connection…" Buttons: Switch to Acme / Keep Acme.
  • The commit message says "Workspaces are compared by id, since whoever makes the code chooses the name". The person never sees that difference.
  • Suggested fix: when same_workspace is false and the normalized names match, say so explicitly, for example "This is a different workspace that is also named Acme". Make the buttons distinguishable too, for example by adding the account email or a short id suffix. Add a test for the collision case.

2. The silent swap from my first pass still exists at the Allow step, and it chains with finding 1.

  • connect_uri (pairing_confirm.py:87-108) replaces a pending request whenever the code differs. The window swaps the prompt in place.
  • My App-level probe on 7bb9d2ca6 showed byte-identical dialog text, the same Allow DOM node, and Allow sending the new request_id. This head's Allow path still takes that route (App.tsx setPairing(state), PairingConfirm unchanged).
  • It now leads to a Switch dialog instead of a live pairing, which is a real mitigation. But together with finding 1, an attacker who fires a link while the person is pairing can end on a Switch dialog that looks like the person's own workspace.
  • The docstring and component comment ("a second link that arrives before the click can't be allowed by it") still overstate the guarantee.
  • Simplest fix: when a different unexpired request is already pending, drop both requests and show "Two different connect links arrived. Nothing changed. Open the link you created again."

Needs another agent (Cloud)

  • As the PR body says, merging this before Cloud returns workspace {id, name} and account {email} on POST /api/local-bridge/pairings/claim with include_identity: true disables connect-link pairing. Every claim gets revoked.
  • The Cloud owner needs to ship that response shape first, or the plain Allow step (ef43ba4d1 minus 94696ce1a) should ship on its own. This PR shouldn't release as 0.35.1 until one of the two is decided.

Non-blocking

  • Allow now spends the code and registers this device (with device_name) in the link creator's workspace before the person sees its name (auth/pairing.py claim_for_review). Keep revokes it, but the creator learns the device name. That's inherent to "Cloud can't preview without claiming". Consider whether device_name can be sent at Switch instead.
  • paired_workspace_id and paired_workspace_name are written only by switch and never cleared on logout or browser sign-in. After a sign-in to another workspace, the next link's dialog can show a stale "Keep ".
  • Both TTLs use time.monotonic(), which doesn't advance during macOS sleep. Cloud's 2-minute revoke is the backstop.

Checked and OK

  • connect_uri only parses, checks the host and stages. It makes no HTTP call and doesn't touch the keychain or hosted_host.
  • The pairing code and the new bearer never appear in a prompt or event (_pairing_prompt and _switch_prompt carry neither).
  • allow and switch each clear their slot before acting (one use) and require the shown request_id. A wrong, missing or expired id changes nothing.
  • A new link during review revokes the earlier claim. Keep, the deadline, and a missing workspace all revoke.
  • claim_for_review refuses when an unfinished pairing stage exists, so recovery can't promote without a Switch.
  • switch_reviewed reuses the existing stage, validate, commit and confirm path with rollback.
  • The pairing_* commands and connect_uri stay outside socket_server._SOCKET_COMMANDS, and set_config can't set allow_local_pairing or the paired_workspace_* keys.
  • D2: capabilities/default.json grants no shell: permission, and the sidecar is spawned from Rust (sidecar.rs).
  • Rust links route connect only to connect_uri.

Generality gate

  1. No per-app code: pass.
  2. Fix the class: the link-confirmation class (connect and runner) shares one pattern. The open items above are siblings within it: a confirmation request replaced while it waits, and identity shown by an attacker-chosen name.
  3. Held-out evidence: none claimed. The PR says the dialogs weren't tried in a running app.

Tests at this head (box, Linux)

  • pytest tests -k "not release_intent" in packages/desktop: 1782 passed, 2 failed, 67 skipped.
    • The 2 failures (test_control_overlay_contract_sync::...matches_pinned_types, which wants openadapt-types 0.24.2 and found 0.24.0, and test_dry_run::test_complete_dry_evidence_projects_codes_without_values) also fail on main a32c13e87. They're environmental.
    • test_auth_pairing.py, test_dispatch.py and test_pairing_protocol_boundary.py: 145 passed, 8 skipped.
  • ruff check .: clean. vitest run: 439 passed (52 files). tsc --noEmit: clean.
  • cargo test --locked in src-tauri (debug, with a placeholder sidecar binary; Rust is unchanged since 7bb9d2ca6): 26 passed, 1 ignored, all 9 pairing::tests passing. cargo fmt --check: clean.
  • scripts/check_file_size_ratchet.py --base origin/main: exit 0.
  • Probes (not committed): the name-collision switchQuestion/keepLabel test above, and the App-level swap test from the first pass.

Not run

  • The real app, the installer launch, and real openadapt:// delivery from a browser.
  • The Native installer job is skipped by this PR's path selection. That job runs cargo test --locked --release and the macOS launch smoke the PR relies on for the shell-permission removal, so neither has CI evidence on this head.
  • Live Cloud. Nothing here exercised the real claim, abort or include_identity responses.

CI at this head

At review time, the main CI workflow (smoke, desktop test and build, packages-gate) was queued for ef43ba4d1. Dependency review, gitleaks, links, platform manifest, and the Python, npm and Rust lock checks passed. The previous head failed only on the ratchet, which passes locally now.

To the PR author: please surface the id mismatch for same-name workspaces, refuse conflicting pending links, and request a re-review on the new head. The Cloud response shape needs its owner. I didn't push to this branch.

Whoever creates a pairing code picks its workspace name, so the Switch
question could read the same for the person's own workspace and for a
different one named like it.

- When the link's workspace has a different id but the current
  workspace's name (NFKC, case and whitespace folded), say "This is a
  different workspace that is also named <name>".
- Both buttons carry a short workspace id, and Switch carries the
  account email, so the two can't read alike.
- A second, different connect link no longer replaces the question on
  screen. Desktop drops both requests, revokes any reviewed claim and
  says "Two different connect links arrived. Nothing changed."
- Sign-in and sign-out forget the workspace a connect link recorded, so
  a later dialog can't offer to keep a stale workspace.
… test config

A link that arrives after two conflicting links asks a fresh question,
and nothing can tell it from the person's own. Mark that question and
the Switch question after it, and say so plainly in the module docs.

Point OPENADAPT_CONFIG_TOML at a temporary file for every test, so
sign-in and sign-out tests can't write the developer's real
~/.openadapt/config.toml.
@abrichr

abrichr commented Nov 30, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Grok
Reviewed-Head: 707d01e

This head adds two commits on top of ef43ba4d, where I had requested changes. Both of those blockers are fixed.

Fixed. A different workspace that reuses the current name is now called out ("This is a different workspace that is also named …"), and the Switch / Keep buttons include a short workspace id and the account email when Cloud sent one. A second, different link that arrives while Allow or Switch is open no longer swaps the question: both requests are dropped, the window shows the two-links error, and a later question is marked after_conflict. I confirmed this in the new engine tests and in the vitest cases for the same-name and two-link prompts.

Still blocking: a required Desktop test is red, and it is caused by this PR. packages / desktop test / Python engine tests (ubuntu-latest, py3.12) fails at this head on test_desktop_has_no_command_that_turns_the_switch_on. That test inventories every dispatcher command whose name contains "approval" or "switch" and expects a fixed approval-mode set. pairing_switch is a new connect-link command, not a command that turns the approval-mode switch on, but it matches the filter, so CI is red. Tighten the filter (for example, only approval-mode names) or list pairing_switch as an unrelated exception. I could not collect this file locally because openadapt_flow.approval_mode.switch is not installed in the Desktop venv here; the failure is from the CI log, and it is visible in the test source.

Still true, as the PR already says: Cloud has to return workspace {id, name} and account {email} on POST /api/local-bridge/pairings/claim with include_identity: true before this should ship as 0.35.1. Until then, Desktop revokes every connect-link claim. Browser sign-in is unaffected.

Tests at this head (box, Linux)

  • tests/test_engine/test_dispatch.py::TestAuthCommands, test_auth_pairing.py and test_pairing_protocol_boundary.py: 62 passed.
  • ruff check on the touched Desktop files: clean.
  • vitest run on PairingConfirm.test.tsx and App.pairingConfirm.test.tsx: 16 passed.
  • I did not rerun the full Desktop pytest suite, tsc, or cargo test. Rust is unchanged since ef43ba4d. The approval-mode file was skipped locally, as noted above.

Not run

  • The real app, the installer, and a live openadapt:// link from a browser.
  • Live Cloud. Nothing here exercised a real claim, abort, or include_identity response.
  • The Native installer job is still skipped by path selection.

CI at this head

The Desktop Python engine job fails on the approval-mode allowlist test above. Other package jobs were still pending when I posted. gitleaks and the lock-file checks had passed.

To the PR author: please fix that allowlist test and request a re-review. I didn't push to this branch.

…mand

The approval-mode inventory counts every command named with "approval"
or "switch". pairing_switch switches the Cloud connection after a
connect link, so list it as an explicit exception, and add a test that it
is the connect-link Switch and can't change approval mode.
@abrichr

abrichr commented Nov 30, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 75379c7

This head adds one test-only commit on top of 707d01ee9, where I had requested changes. The one remaining blocker is fixed. I found no new issues.

Prior blockers

  • ef43ba4d pip install -r requirements (There is no requirements file in the repo) #1, same-name workspaces: still fixed. Nothing outside the test file changed since 707d01ee9. The vitest cases for the collision prompt pass here.
  • ef43ba4d alembic upgrade head #2, silent swap at Allow and Switch: still fixed, for the same reason. The two-link engine and App tests pass.
  • 707d01ee9, red approval-mode inventory test: fixed.
    • test_desktop_has_no_command_that_turns_the_switch_on (packages/desktop/tests/test_engine/test_approval_mode.py:232) exempts exactly one name, pairing_switch (:238). Every other approval or switch command still has to be in the fixed set.
    • test_pairing_switch_cannot_change_approval_mode (:258) checks three things:
      • the handler is PairingConfirmation.switch;
      • pairing_confirm.py never mentions the approval-mode API;
      • a refused pairing_switch (:274) leaves get_approval_mode unchanged while a switch is on.
  • Earlier non-blocking note, stale names: addressed. forget_paired_workspace (pairing_confirm.py:60) runs on sign-in and sign-out.

Bypass probes (temporary edits, reverted)

I made each edit, ran the two tests, then reverted it:

  • Register a second command, pairing_switch_approval: the inventory test fails, as it should.
  • Bind pairing_switch to confirmation.allow instead of switch: the new test fails.
  • Add the text approval_mode to pairing_confirm.py: the new test fails.
  • Run the 707d01ee9 version of the inventory test against this head's code: it fails at :238. That reproduces the CI failure, so the exemption is what fixes it.

The exemption is by exact name, and the handler is pinned by identity. A renamed command or a different binding can't slip through.

Tests at this head (box, Linux, Python 3.14, PYTHONPATH=../flow:../types so the approval-mode file is collected, not skipped)

  • test_approval_mode.py, test_dispatch.py, test_auth_pairing.py, test_pairing_protocol_boundary.py, test_portal/test_pairing.py: 226 passed, 0 skipped.
  • Full Desktop suite, pytest tests -k "not release_intent": 1928 passed, 1 failed, 25 skipped.
    • The failure is test_control_overlay_contract_sync::...matches_pinned_types: "openadapt-types 0.24.2 is required … found 0.24.0".
    • It is a local package-version mismatch. It also failed on main in my earlier runs.
  • vitest run: 443 passed (52 files). tsc --noEmit: clean.
  • Contract check against the Cloud half of this change: Desktop's _validated_claim(..., allow_identity=True) and claim_identity accept exactly the workspace/account keys, with null values, that Cloud returns.

Generality gate

  1. No per-app code: pass. Only a test changed.
  2. Fix the class, not the instance: pass. The inventory still catches any future command with approval or switch in its name. The exemption is one named command, backed by a behavioural test.
  3. Held-out evidence: not applicable to a test-only change.

Not run

  • cargo test. Rust is unchanged since ef43ba4d.
  • The real app, the installer, a live openadapt:// link, and live Cloud.
  • The Native installer job, which path selection still skips.

CI at this head

  • Passed: gitleaks, dependency review, lock checks, links, platform manifest, smoke, launcher, desktop Real Chrome profile (macOS and Windows), and Qualification contract.
  • Still pending when I posted: desktop test / Python engine tests, which failed on the previous head, plus the flow core, desktop build and fast-checks jobs.
  • Please confirm the engine job goes green before merging.

Merge order

As the PR says, Cloud has to return the identity fields first. The Cloud change and its migration need to be deployed before this ships. Otherwise Desktop revokes every connect-link claim.

I didn't push to this branch.

@abrichr
abrichr added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 77cf7ca Nov 30, 2026
58 checks passed
@abrichr
abrichr deleted the fix/desktop-connect-link-confirm branch November 30, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant