Skip to content

feat(profile-metrics-controller): tag, canonicalize, and dedupe hardware, imported, and non-mnemonic snap accounts - #10107

Merged
mathieuartu merged 7 commits into
mainfrom
fix/pmc-null-bucket
Sep 10, 2026
Merged

feat(profile-metrics-controller): tag, canonicalize, and dedupe hardware, imported, and non-mnemonic snap accounts#10107
mathieuartu merged 7 commits into
mainfrom
fix/pmc-null-bucket

Conversation

@mathieuartu

@mathieuartu mathieuartu commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Explanation

References

Related to: https://consensyssoftware.atlassian.net/browse/MUL-2216

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

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, or snap) derived from mnemonic entropy vs keyring type, and sends it to the auth API as account_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. reportedAccounts persists 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 accountSourceBackfillEnqueued pass (alongside existing proof backfill) that rebuilds the sync queue on first unlock. Poll behavior is tightened: empty queue skips work; non-mnemonic batches (null key) submit without proofs; proof signing matches live accounts by canonical address via refactored enqueueAccounts helpers.

Reviewed by Cursor Bugbot for commit ba3769d. Bugbot is set up for automated code reviews on this repo. Configure here.

…re, imported, and non-mnemonic snap accounts
@mathieuartu mathieuartu self-assigned this Sep 4, 2026
@mathieuartu
mathieuartu requested review from a team as code owners September 4, 2026 09:29
@mathieuartu
mathieuartu deployed to default-branch September 4, 2026 09:30 — with GitHub Actions Active
@mathieuartu mathieuartu changed the title fix(profile-metrics-controller): tag, canonicalize, and dedupe hardware, imported, and non-mnemonic snap accounts feat(profile-metrics-controller): tag, canonicalize, and dedupe hardware, imported, and non-mnemonic snap accounts Sep 9, 2026
Comment thread packages/profile-metrics-controller/CHANGELOG.md
Comment thread packages/profile-metrics-controller/src/ProfileMetricsController.ts Outdated
Comment thread packages/profile-metrics-controller/src/ProfileMetricsController.ts
Comment thread packages/profile-metrics-controller/src/ProfileMetricsService.test.ts Outdated
@mathieuartu
mathieuartu added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit 69951ee Sep 10, 2026
43 checks passed
@mathieuartu
mathieuartu deleted the fix/pmc-null-bucket branch September 10, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants