fix: emit backup and sync trace only when mutations occur#9343
Merged
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. |
ccharly
approved these changes
Jul 6, 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-1965
Checklist
Note
Low Risk
Observability and sync orchestration only; sync behavior is unchanged aside from when analytics traces fire and local-write flags on rollback.
Overview
Multichain Account Syncing - Full is no longer emitted on every full backup-and-sync run. A new
SyncMutationTrackeron the backup-and-sync context records remote writes (user storage pushes) and local writes (changes a per-wallet rollback can undo). Sync helpers set these flags when they actually apply metadata, create groups, rename legacy accounts, or push to storage.performFullSyncnow runs the sync without wrapping it intraceFn, resets the tracker at the start, and only after cleanup emits a backdatedAccountSyncFullspan whenhasOccurred()is true. Rolled-back wallets restore the pre-wallet local-write flag so reverted local edits do not count; durable remote writes still do. Trace emission is best-effort (failures are logged and do not block clearing the in-progress flag).Reviewed by Cursor Bugbot for commit eff2087. Bugbot is set up for automated code reviews on this repo. Configure here.