{"record":{"id":"a10af4a44d77e701","repo":"affaan-m/ECC","slug":"unsupported-uninstall-operation-kind-operation","errorCode":null,"errorMessage":"Unsupported uninstall operation kind: ${operation.kind}","messagePattern":"Unsupported uninstall operation kind: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/install-lifecycle.js","lineNumber":1098,"sourceCode":"      };\n    }\n\n    const previousJson = getOperationPreviousJson(operation);\n    if (previousJson !== undefined) {\n      writeContainedFile(operation.destinationPath, formatJson(previousJson), trustedRoot, 'uninstall');\n      return {\n        removedPaths: [],\n        cleanupTargets: []\n      };\n    }\n\n    return {\n      removedPaths: [],\n      cleanupTargets: []\n    };\n  }\n\n  throw new Error(`Unsupported uninstall operation kind: ${operation.kind}`);\n}\n\nfunction inspectManagedOperation(repoRoot, trustedRoot, operation, linkIndex = null, target = null) {\n  const destinationPath = operation.destinationPath;\n  if (!destinationPath) {\n    return {\n      status: 'invalid-destination',\n      operation\n    };\n  }\n\n  let managedDestination;\n  try {\n    managedDestination = getManagedDestination(\n      destinationPath,\n      trustedRoot,\n      'inspect managed operation',\n      { allowFinalSymlink: operation.kind === 'remove' }","sourceCodeStart":1080,"sourceCodeEnd":1116,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/install-lifecycle.js#L1080-L1116","documentation":"Final fallback in the uninstall operation executor: thrown when operation.kind matches none of the supported uninstall kinds (copy-file, merge-json, remove, etc.). The uninstaller cannot safely process the unknown operation.","triggerScenarios":"Install-state record contains an operation kind unknown to the running uninstaller (version skew), or a corrupted/invalid operation entry with an unrecognized kind.","commonSituations":"Downgrading the plugin then uninstalling; state written by a newer installer; manually edited state JSON with typo'd kind values.","solutions":["Upgrade the installer/uninstaller to the version that wrote the state","Inspect and fix or drop the unknown operation entries in the state record","Delete the stale install-state and manually clean up remaining managed files"],"exampleFix":"// before\nuninstallFromRecord(record); // unknown kind 'template-render'\n// after\nawait updateToInstallerVersion(record.installerVersion);\nuninstallFromRecord(record);","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['copy-file','merge-json','remove'];\nif (record.state?.operations.some(op => !SUPPORTED.includes(op.kind))) throw new Error('state contains unsupported uninstall kinds');","typeGuard":"const uninstallSupported = (kind) => ['copy-file','merge-json','remove'].includes(kind);","tryCatchPattern":"try { uninstallFromRecord(record); } catch (e) { if (String(e.message).startsWith('Unsupported uninstall operation kind')) { await upgradeAndUninstall(record); } else throw e; }","preventionTips":["Match uninstaller version to installer version","Inspect state operations before uninstalling","Clean up manually if state is from an unknown version"],"tags":["install","uninstall","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}