Skip to content

Google Messages: signing out leaves this computer paired on the phone - #848

Closed
itz4blitz wants to merge 1 commit into
mainfrom
issue/703-sign-out
Closed

itz4blitz wants to merge 1 commit into
mainfrom
issue/703-sign-out

Conversation

@itz4blitz

Copy link
Copy Markdown
Collaborator

What changed and why

Signing out of Google Messages asks the phone to drop this computer, then closes. When the phone cannot be reached, the adapter's answer is: "This computer may still be listed under Device pairing on your phone. Remove it there." The saved session is forgotten either way. The sign-in helper already removes its private browser profile when the browser closes.

Type

  • fix
  • feature
  • perf
  • refactor
  • chore
  • docs

Platforms

  • windows
  • macos
  • linux
  • android
  • ios

Proof

Scenario: e2e/scenarios/messages-sign-out

Lab run:

Compatibility

No protocol change. An older server and an older client are unchanged.

Risk and rollback

If the phone rejects the unpair, the failure is logged and local sign-out still finishes. Revert this commit to leave the phone's paired list as it was.

Release note

Signing out of Google Messages asks the phone to drop this computer.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Tiny Code Review

⚠️ Code review unavailable · run

the AI provider rate-limited the request

This is advice, not a gate. Re-run with the agent:review label or a /review comment.

@unRekable unRekable left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

🟢 No findings.

The change adds a best-effort unpair to Google Messages sign-out: action 46 naming the pairing attempt id in field 1, sent in the clear like the existing Gaia pairing actions 44/45/47, with a 4-second deadline that fits inside chatd's 5-second SIGN_OUT wait. The ordering is right — the adapter is asked to unpair while the drive is still open, then closes, and the untouched generic path deletes the keychain item afterwards, so the saved session is forgotten even when the phone cannot be reached. No wire or serde shape changes, no new outbound host, no secrets in the added log lines, and everything stays inside chatd. The wire change has a real unit test, two integration tests fail without the change, and the scenario's driver fails on main because an old build serves forever and is killed at the 60-second timeout.

Residual risk

  • Google's acceptance of action 46 and the phone's actual unpair are never exercised: the lab proof only checks the request bytes name the attempt and travel in the clear, and both drives (fake, offline) skip the real phone. Worst case equals the pre-change behavior — no unpair, a logged best-effort failure, sign-out still finishes.
  • A session saved before pairing_id existed parses with an empty id (serde default), so unpair returns Ok without contacting the phone and the computer may stay listed with no user-facing note; adapter replies are discarded by server.rs's sign_out, so STILL_LISTED reaches only the warn log.
  • The HTTP POST for the unpair can block up to the agent's 30-second timeout, longer than chatd's 5-second sign-out wait, so the unpair can outlive the account it belongs to; harmless today because the late reply goes to a dropped receiver.

@itz4blitz

Copy link
Copy Markdown
Collaborator Author

Superseded by and merged in #903 (d387971 — Release 2026-11-20 combined PR).

@itz4blitz itz4blitz closed this Nov 21, 2026
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.

2 participants