Skip to content

Sync: wire device_info writing into the login flow for the unified device list - #9415

Draft
CDRussell wants to merge 1 commit into
feature/craig/sync_unified_devices_gzip_support_devices_endpointfrom
feature/craig/sync_unified_devices_wire_into_login_and_signup_flows
Draft

Sync: wire device_info writing into the login flow for the unified device list#9415
CDRussell wants to merge 1 commit into
feature/craig/sync_unified_devices_gzip_support_devices_endpointfrom
feature/craig/sync_unified_devices_wire_into_login_and_signup_flows

Conversation

@CDRussell

@CDRussell CDRussell commented Aug 6, 2026

Copy link
Copy Markdown
Member

Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1216792641477210?focus=true
Tech Design URL (if applicable):
API Proposals URL(s) (if applicable):

Description

Adds LoginDeviceInfoWriter, invoked fire-and-forget after a successful native (ddg) login. It brings the signed-in device into the unified device list world.

Login is the point where a device that just authenticated should publish its device_info and, if needed, make the account key readable by its own credential.

Behaviour / safety
• Gated on SyncFeature.canWriteUnifiedDeviceList(), which is still off by default
• Best-effort: the legacy name/type written by the login itself is the must-succeed part; nothing here can fail or block login

Steps to test this PR

Creating account

  • Fresh install internal variant
  • Configure feature flags
    • canUseV2ConnectFlow - should be enabled already, just check
    • canWriteUnifiedDeviceList leave it disabled.
    • canReadUnifiedDeviceList make this enabled
  • Open Sync Dev Settings and tap Create account. Copy the recovery code by tapping on it as you'll need it later
  • Tap Fetch & decrypt devices and verify no device_info

Sign out / sign in

  • Enable canWriteUnifiedDeviceList
  • Tap Reset migration marker (just in case a migration ran)
  • Sign out of sync
  • Sign back in using the recovery code from earlier
  • Verify you see the following logs:
     Sync-UnifiedDevices: no account_info key in login response; migration will create it
     Sync-UnifiedDevices: registering account_info key (…, wraps=1)
     Sync-UnifiedDevices: setKeysIfAbsent purpose=account_info, wraps=1
     Sync-UnifiedDevices: set-if-absent 201 — our keypair won
     Sync-UnifiedDevices: writing device_info for this device
     Sync-UnifiedDevices: patchDevices ok — 1 devices_v2 returned
     Sync-UnifiedDevices: migration complete for this device (1 devices_v2 returned)

Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@CDRussell
CDRussell force-pushed the feature/craig/sync_unified_devices_wire_into_login_and_signup_flows branch from dbafcb7 to 5f5a3c6 Compare August 6, 2026 13:56
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