Skip to content

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

Open
mathieuartu wants to merge 2 commits into
mainfrom
fix/pmc-null-bucket
Open

fix(profile-metrics-controller): tag, canonicalize, and dedupe hardware, imported, and non-mnemonic snap accounts#10107
mathieuartu wants to merge 2 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
⚠️ Blocked by: Backend accepting a new source field in the submission payload ⚠️

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 profile metrics sync state, enqueue/backfill behavior, and outbound account payloads; mistakes could mis-attribute accounts or skip/resubmit metrics incorrectly.

Overview
Profile metrics submissions now carry richer account metadata and avoid duplicate reporting for hardware, imported, and non-mnemonic Snap wallets.

Account source and API payload: Non-mnemonic accounts are tagged with optional source (hardware | imported | snap) from keyring type when queued and sent via ProfileMetricsService; mnemonic-backed accounts stay attributed by entropy source only.

Canonical addresses at enqueue: Addresses are normalized when added to the sync queue (not only during proof signing), so proof-less batches still reach the auth API in canonical form. Proof signing matches queued entries to live accounts by that canonical address.

Deduping and upgrade backfill: New persisted reportedAccounts skips re-enqueueing addresses already submitted successfully. A one-time accountSourceBackfillEnqueued path (with existing bootstrap flags) re-queues all known accounts after upgrade so legacy syncs pick up source and canonical addresses; fresh installs set the flag on first sync.

Reviewed by Cursor Bugbot for commit 13f68d5. 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
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.

1 participant