From 77dd4697641b38df1243b0ab6a739d206752f551 Mon Sep 17 00:00:00 2001 From: Patrick Jungermann Date: Mon, 26 Oct 2026 18:32:40 +0100 Subject: [PATCH] fix(bin): extend Claude migrate drift catalog with new regenerable sidecars A backup run on an up-to-date Claude Code install hit 8 drift entries and refused to continue: mcp-needs-auth-cache.json policy-limits.json.signature-iat.json policy-limits.json.signature.json remote-settings.json.signature-iat.json remote-settings.json.signature.json remote-settings.json.synced-at state plugins/plugin-directory-cache-v2.json All are server-signed sidecars, sync timestamps, caches, or runtime state that Claude Code regenerates on next launch; none hold anything the user would want on a new laptop. Classify them as excludes: * mcp-needs-auth-cache.json: MCP auth lookup cache * policy-limits.json.signature{,-iat}.json: signature + issued-at sidecars for the Anthropic-signed policy-limits.json (which is already excluded; its signature pair follows the same semantics) * remote-settings.json.signature{,-iat}.json, .synced-at: same pattern for remote-settings * state: Claude Code's runtime state dir (one-time dialog flags, onboarding progress, etc.); regenerable * plugins/plugin-directory-cache-v2.json: plugin catalog cache, peer of the already-excluded plugin-catalog-cache.json Entries slot in alphabetically within each list. Enumeration kept explicit rather than switching to a prefix match so a genuinely new sidecar name (e.g. a future ".ciphertext.json" that would warrant copying) still trips the drift gate instead of being silently swept. --- bin/migrate-claude-code.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/bin/migrate-claude-code.sh b/bin/migrate-claude-code.sh index c85fca0..9d6cf02 100755 --- a/bin/migrate-claude-code.sh +++ b/bin/migrate-claude-code.sh @@ -109,16 +109,21 @@ KNOWN_EXCLUDE_CLAUDE=( ".env" ".last-cleanup" ".last-update-result.json" "backups" "cache" "daemon" "daemon-auth-cooldown" "daemon-auth-status.json" "daemon.lock" "daemon.log" "daemon.status.json" - "debug" "downloads" "file-history" "jobs" "paste-cache" - "policy-limits.json" "policy-limits.json.stamp.json" - "remote-settings.json" "security" "session-env" "shell-snapshots" - "stats-cache.json" "tasks" "telemetry" + "debug" "downloads" "file-history" "jobs" "mcp-needs-auth-cache.json" + "paste-cache" + "policy-limits.json" "policy-limits.json.signature-iat.json" + "policy-limits.json.signature.json" "policy-limits.json.stamp.json" + "remote-settings.json" "remote-settings.json.signature-iat.json" + "remote-settings.json.signature.json" "remote-settings.json.synced-at" + "security" "session-env" "shell-snapshots" + "state" "stats-cache.json" "tasks" "telemetry" ) KNOWN_INCLUDE_PLUGINS=( "data" "blocklist.json" ) KNOWN_EXCLUDE_PLUGINS=( ".last_inuse_sweep" "marketplaces" "cache" "store" "synced" - "installed_plugins.json" "known_marketplaces.json" "plugin-catalog-cache.json" + "installed_plugins.json" "known_marketplaces.json" + "plugin-catalog-cache.json" "plugin-directory-cache-v2.json" ) KNOWN_EXCLUDE_PREFIXES=( "security_warnings_state_" )