Repository navigation
Conversation
Tiny Code Reviewthe AI provider rate-limited the request This is advice, not a gate. Re-run with the |
unRekable
left a comment
There was a problem hiding this comment.
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.
5343d73 to
ee7f83e
Compare
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
Platforms
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.