fix: emit backup and sync trace only when mutations occur#9343
Open
mathieuartu wants to merge 6 commits into
Open
fix: emit backup and sync trace only when mutations occur#9343mathieuartu wants to merge 6 commits into
mathieuartu wants to merge 6 commits into
Conversation
sirtimid
added a commit
that referenced
this pull request
Jul 1, 2026
Follow-up to the `mm daemon list` review: - Distinguish `ECONNRESET` (connection dropped mid-request, likely a daemon crash) from a stopped daemon, rather than telling the user to `mm daemon start` when one is already running. - Name `MM_DATA_DIR` (the user-facing override) instead of the internal `MM_DAEMON_DATA_DIR` in the permission-denied hint. - Extract a shared `formatJsonRpcError` helper and move `isStringArray` into `daemon/utils`; `daemon call` and `daemon list` now both use them. - Parse argv in `daemon list` so unknown flags are rejected (matching `daemon call`). - Fix the `daemon call` action example to a wired controller (`KeyringController:getState`). - Point the connection-error changelog entry at #9339 (was #9343). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sirtimid
added a commit
that referenced
this pull request
Jul 1, 2026
Follow-up to the `mm daemon list` review: - Distinguish `ECONNRESET` (connection dropped mid-request, likely a daemon crash) from a stopped daemon, rather than telling the user to `mm daemon start` when one is already running. - Name `MM_DATA_DIR` (the user-facing override) instead of the internal `MM_DAEMON_DATA_DIR` in the permission-denied hint. - Extract a shared `formatJsonRpcError` helper and move `isStringArray` into `daemon/utils`; `daemon call` and `daemon list` now both use them. - Parse argv in `daemon list` so unknown flags are rejected (matching `daemon call`). - Fix the `daemon call` action example to a wired controller (`KeyringController:getState`). - Point the connection-error changelog entry at #9339 (was #9343). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sirtimid
added a commit
that referenced
this pull request
Jul 1, 2026
Follow-up to the `mm daemon list` review: - Distinguish `ECONNRESET` (connection dropped mid-request, likely a daemon crash) from a stopped daemon, rather than telling the user to `mm daemon start` when one is already running. - Name `MM_DATA_DIR` (the user-facing override) instead of the internal `MM_DAEMON_DATA_DIR` in the permission-denied hint. - Extract a shared `formatJsonRpcError` helper and move `isStringArray` into `daemon/utils`; `daemon call` and `daemon list` now both use them. - Parse argv in `daemon list` so unknown flags are rejected (matching `daemon call`). - Fix the `daemon call` action example to a wired controller (`KeyringController:getState`). - Point the connection-error changelog entry at #9339 (was #9343). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sirtimid
added a commit
that referenced
this pull request
Jul 1, 2026
Follow-up to the `mm daemon list` review: - Distinguish `ECONNRESET` (connection dropped mid-request, likely a daemon crash) from a stopped daemon, rather than telling the user to `mm daemon start` when one is already running. - Name `MM_DATA_DIR` (the user-facing override) instead of the internal `MM_DAEMON_DATA_DIR` in the permission-denied hint. - Extract a shared `formatJsonRpcError` helper and move `isStringArray` into `daemon/utils`; `daemon call` and `daemon list` now both use them. - Parse argv in `daemon list` so unknown flags are rejected (matching `daemon call`). - Fix the `daemon call` action example to a wired controller (`KeyringController:getState`). - Point the connection-error changelog entry at #9339 (was #9343). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d55336f. Configure here.
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
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-1965
Checklist
Note
Low Risk
Analytics/tracing behavior change in backup-and-sync only; sync logic is instrumented but not redesigned, with broad test coverage.
Overview
The Multichain Account Syncing - Full trace (
TraceName.AccountSyncFull) is no longer wrapped around every full backup-and-sync run. Sync work runs untraced; a backdated span is emitted afterward only when the run recorded a durable change.A new
SyncMutationTrackeronBackupAndSyncContextrecords remote writes (user storage pushes) and local writes (metadata/group/legacy updates). Sync helpers callsetRemoteWrite/setLocalWritewhen they actually persist. On per-wallet rollback, the local-write flag is restored with the state snapshot so reverted local edits do not count as mutations; remote writes still count.Trace emission is best-effort (failures are logged, sync still completes and clears in-progress state). Tests cover no-op runs, local vs remote mutations, rollback, and failures after partial durable work.
Reviewed by Cursor Bugbot for commit ef063ff. Bugbot is set up for automated code reviews on this repo. Configure here.