{"record":{"id":"e61fdd500af71c85","repo":"affaan-m/ECC","slug":"final-verification-failed","errorCode":"FINAL_VERIFICATION_FAILED","errorMessage":"Could not verify destination-only ${CURRENT_PLUGIN_ID} state after source cleanup.","messagePattern":"Could not verify destination-only (.+?) state after source cleanup\\.","errorType":"exception","errorClass":"ClaudeSetupError","httpStatus":null,"severity":"error","filePath":"scripts/lib/claude-scope-migration.js","lineNumber":236,"sourceCode":"    } catch {\n      // Preserve the safest known two-scope state in the structured recovery.\n    }\n    throw migrationError(\n      'SOURCE_UNINSTALL_FAILED',\n      `The destination is installed, but Claude could not remove the ${migration.sourceScope} source scope.`,\n      {\n        phase: 'source-uninstall',\n        observedScopes,\n        recovery: recoveryCommands(migration.sourceScope, destinationScope),\n      }\n    );\n  }\n}\n\nfunction verifyFinalState(run, paths, destinationScope) {\n  const plugins = readPluginInventory(run, paths.projectRoot, 'final-verification');\n  return validateExpectedScopes(plugins, [destinationScope], {\n    code: 'FINAL_VERIFICATION_FAILED',\n    destinationScope,\n    message: `Could not verify destination-only ${CURRENT_PLUGIN_ID} state after source cleanup.`,\n    phase: 'final-verification',\n    recovery: recoveryCommands(null, destinationScope),\n  });\n}\n\nfunction migrateClaudePluginScope(options = {}, dependencies = {}) {\n  if (!VALID_SCOPES.has(options.scope)) {\n    throw migrationError(\n      'INVALID_SCOPE',\n      'Scope migration requires --scope user, project, or local.'\n    );\n  }\n  if (options.hooks !== undefined && !VALID_HOOK_MODES.has(options.hooks)) {\n    throw migrationError('INVALID_HOOK_MODE', `Invalid hook mode: ${options.hooks}`);\n  }\n","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/claude-scope-migration.js#L218-L254","documentation":"Error \"Could not verify destination-only ${CURRENT_PLUGIN_ID} state after source cleanup.\" thrown in affaan-m/ECC.","triggerScenarios":"Thrown at scripts/lib/claude-scope-migration.js:236 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The source scope was cleaned up but the plugin could not be verified as present only in the destination scope. Inspect the plugin inventory at the project root to see which scopes still report the plugin.","Re-run the migration after manually removing stale plugin entries from the old scope, then verify with the listed recovery commands.","Check for partial writes or permission errors during the destination install; fix permissions and re-run the migration."],"exampleFix":"# Inspect scopes, remove the stale source entry, then retry:\nls ~/.claude/plugins && rm -rf ~/.claude/plugins/<stale-ecc-entry>\necc setup --move-scope --scope project","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}