feat(profile-metrics-controller): tag, canonicalize, and dedupe hardware, imported, and non-mnemonic snap accounts - #10107
Merged
Merged
Conversation
…re, imported, and non-mnemonic snap accounts
ccharly
reviewed
Sep 10, 2026
… instead of rescanning the queue
ccharly
reviewed
Sep 10, 2026
ccharly
approved these changes
Sep 10, 2026
tommasini
approved these changes
Sep 10, 2026
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.
Explanation
References
Related to: https://consensyssoftware.atlassian.net/browse/MUL-2216
Checklist
Note
Medium Risk
Changes what is sent to the auth profile API and how proof-of-ownership is matched, with one-time backfill for existing opted-in users; behavior is well tested but affects metrics/auth integration.
Overview
Profile metrics sync now enriches each queued account with an optional
accountSource(mnemonic,hardware,imported, orsnap) derived from mnemonic entropy vs keyring type, and sends it to the auth API asaccount_source(unknown keyrings stay untagged).Canonical addresses are applied when accounts are enqueued, not only when signing proofs, so hardware, imported, and non-mnemonic Snap accounts are submitted in the form the API expects.
reportedAccountspersists successfully submitted canonical addresses so re-enqueue is skipped; enqueue also dedupes by canonical address to avoid double-using proof nonces.Upgraders get a one-time
accountSourceBackfillEnqueuedpass (alongside existing proof backfill) that rebuilds the sync queue on first unlock. Poll behavior is tightened: empty queue skips work; non-mnemonic batches (nullkey) submit without proofs; proof signing matches live accounts by canonical address via refactoredenqueueAccountshelpers.Reviewed by Cursor Bugbot for commit ba3769d. Bugbot is set up for automated code reviews on this repo. Configure here.