Sync: read device_info in the device list, preferring it over legacy device data - #9395
Merged
CDRussell merged 1 commit intoAug 6, 2026
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
CDRussell
force-pushed
the
feature/craig/sync_unified_devices_update_device_list_ui_consume_deviceinfo
branch
4 times, most recently
from
August 5, 2026 14:03
df94cf1 to
5276397
Compare
CDRussell
commented
Aug 5, 2026
CDRussell
force-pushed
the
feature/craig/sync_unified_devices_update_device_list_ui_consume_deviceinfo
branch
from
August 5, 2026 15:00
5276397 to
48da81b
Compare
CDRussell
marked this pull request as ready for review
August 5, 2026 15:13
MiSikora
reviewed
Aug 6, 2026
Contributor
There was a problem hiding this comment.
@CDRussell I approved the PR but I left a comment in Asana. Please take a look before merging.
MiSikora
approved these changes
Aug 6, 2026
This was referenced Aug 6, 2026
CDRussell
force-pushed
the
feature/craig/sync_unified_devices_update_device_list_ui_consume_deviceinfo
branch
from
August 6, 2026 14:44
48da81b to
f8bd813
Compare
Member
Author
Merge activity
|
CDRussell
deleted the
feature/craig/sync_unified_devices_update_device_list_ui_consume_deviceinfo
branch
August 6, 2026 14:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1216792641477211?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/72649045549333/task/1215838110052947?focus=true
API Proposals URL(s) (if applicable):
Description
Adds the
readside of the unified device list, reading fromdevice_infowhere it can and preferring that over the legacy device name/type.Gated by sync feature flag:
canReadUnifiedDeviceList. The logic is defined in Define feature flag for unified device list support [ 2h ] for when flag is enabled and disabled. When the flag is on, undecryptable devices are no longer logged out; they render as "Unknown device"Adds in-memory cache of the wrapped account_info key entry in
RealAccountInfoPrivateKeyProvider, as otherwise it's unnecessarily hammering the server and will get rate limited.Pixels will come later.
Steps to test this PR
Note
Logcat filter:
Sync-UnifiedDevicesSetup
internalbuildSync Dev Settingsand tapCreate accountto quickly set up synccanReadUnifiedDeviceListandcanWriteUnifiedDeviceListtogglesDevice list reads from legacy when
device_infoomittedLaunch Sync Settingsto visit productionSync & Backupscreen0 via device_info, 1 via legacyDevice list reads from device_info if it's available
Sync Dev Settingsand tapRun migration now, verifying thatmigrated: trueLaunch Sync Settingsto visit productionSync & Backupscreen1 via device_info, 0 via legacyWarning
For the error handling scenarios, don't use this with your real sync setup as it could log other devices out
Note
Sync with another device so that you have 2 devices connected. You're about to apply patches to one of them to test error handling.
Error handling (device_info undecryptable)
Sync Dev Settingsand tapLaunch Sync Settingsto visit productionSync & BackupscreenDEV forcing device_info undecryptableto confirm the patch is working, and0 via device_info, 2 via legacyError handling (legacy undecryptable)
Sync Dev Settingsand tapLaunch Sync Settingsto visit productionSync & Backupscreen2 devices → 1 via device_info, 0 via legacy, 1 placeholder, 0 undecryptableError handling (legacy undecryptable with canRead FF off)
canReadUnifiedDeviceList, then return to production device list. This will auto-logout the other device, so you'll see:2 devices → 0 via device_info, 1 via legacy, 0 placeholder, 1 undecryptable1 devices → 0 via device_info, 1 via legacy, 0 placeholder, 0 undecryptableNote
Medium Risk
Changes production device-list decryption and when peers are auto-logged out (flag-gated), plus sync key fetch caching; crypto paths are involved but plaintext keys are not cached and legacy behavior remains when the flag is off.
Overview
Adds the read path for the unified device list behind
canReadUnifiedDeviceList. When enabled, connected devices are decrypted from cross-credentialdevice_info(oneDeviceInfoDecryptorsession per list) when present, with legacy name/type as fallback; when the flag is off, behavior stays on the legacy-only path.With the read flag on, decrypt failures no longer feed
undecryptablefor auto-logout—devices show as "Unknown device" placeholders instead (flag off keeps the existing logout rules for confirmed corruption).RealAccountInfoPrivateKeyProvidernow caches only the wrappedaccount_infokey per user+credential (singleGET /sync/keysunder burst reads), clears on sign-out, and still unwraps on everyprivateKey()call.Internal Sync Dev Settings adds a
canReadUnifiedDeviceListtoggle alongside the write flag.Reviewed by Cursor Bugbot for commit 48da81b. Configure here.