Sync: write device_info + account_info key atomically during signup for the unified device list - #9434
Merged
CDRussell merged 1 commit intoAug 12, 2026
Conversation
12 tasks
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
CDRussell
commented
Aug 7, 2026
CDRussell
marked this pull request as ready for review
August 7, 2026 16:26
Base automatically changed from
feature/craig/sync_unified_devices_wire_into_login_flow
to
develop
August 7, 2026 16:27
CDRussell
force-pushed
the
feature/craig/sync_unified_devices_wire_into_signup_flow
branch
from
August 7, 2026 16:30
3136fb9 to
928c7c2
Compare
MiSikora
approved these changes
Aug 10, 2026
| override fun build(accountSecretKey: String, deviceName: String, deviceType: String): SignupAccountInfo? { | ||
| if (!syncFeature.canWriteUnifiedDeviceList().isEnabled()) return null | ||
|
|
||
| val minted = when (val result = accountInfoKeyManager.mintUnregistered(accountSecretKey)) { |
Contributor
There was a problem hiding this comment.
⛏️: Could we rename it to something like mintedKey? minted reads a bit like a boolean.
…or the unified device list
CDRussell
force-pushed
the
feature/craig/sync_unified_devices_wire_into_signup_flow
branch
from
August 12, 2026 07:48
928c7c2 to
488649c
Compare
Member
Author
Merge activity
|
CDRussell
deleted the
feature/craig/sync_unified_devices_wire_into_signup_flow
branch
August 12, 2026 08:02
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/1217243927034013?focus=true
Tech Design URL (if applicable):
API Proposals URL(s) (if applicable):
Description
Extends signup to bring the new device into the unified device list in the same request. On the v2/ddg signup path, when
canWriteUnifiedDeviceListis enabled, creating an account now includes theaccount_infokey and this device's encrypteddevice_infoin the signup body, so account + key +device_infoare created atomically.Unlike login, which can't include
device_infoin its request (theaccount_infopublic key only arrives in the login response, so it writes via a follow-upPATCH), signup mints the key locally and has the public key up front, so it's a genuine one-shot.Steps to test this PR
Pre-requisites
internalvariantFF enabled: Creating account writes device_info
canReadUnifiedDeviceListcanWriteUnifiedDeviceListSync Dev Settingsand tapCreate accountProduction device list
1 via device_infoFF disabled: Creating account writes device_info
Sync Dev SettingscanReadUnifiedDeviceListcanWriteUnifiedDeviceListremains disabledCreate accountsignup wrote device_infoNote
Medium Risk
Changes the signup wire format and local key minting for new accounts on a crypto-sensitive path, though behavior is feature-flagged and degrades gracefully when mint/encrypt fails.
Overview
On the v2/ddg account-creation path, signup can now send the unified device list in a single request when
canWriteUnifiedDeviceListis enabled: a locally mintedaccount_infoprotected key and a JWEdevice_infoblob encrypted under that key’s public half.SignupAccountInfoBuilderorchestrates mint + encrypt (best-effort; failures omit the fields and signup still succeeds).AccountInfoKeyManager.mintUnregisteredexposes ddg-only minting withoutset-if-absent;DeviceInfoEncryptorcan encrypt against an explicit public key for signup before anything is cached.After a successful signup that included those fields, the client caches
accountInfoPublicKeyand marks unified-device-list migration for the user. Signup API models andcreateAccountwire through optionaldevice_infoandkeys.Reviewed by Cursor Bugbot for commit 3136fb9. Configure here.