{"record":{"id":"cc774736820629dd","repo":"affaan-m/ECC","slug":"unknown-install-content-transform-operation-con","errorCode":null,"errorMessage":"Unknown install content transform: ${operation.contentTransform}","messagePattern":"Unknown install content transform: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-lifecycle.js","lineNumber":187,"sourceCode":"\nfunction buildLinkIndexForOperations(operations, trustedRoot) {\n  const mappings = (operations || [])\n    .filter(operation => operation.kind === 'copy-file' && operation.sourceRelativePath)\n    .map(operation => ({\n      sourceRel: operation.sourceRelativePath,\n      destRel: path.relative(trustedRoot, operation.destinationPath),\n    }));\n  return buildInstallIndex(mappings);\n}\n\nfunction transformCopyFileContent(operation, content) {\n  if (!operation.contentTransform) {\n    return content;\n  }\n  if (operation.contentTransform === 'antigravity-agent-frontmatter') {\n    return adaptAntigravityAgent(content, operation.sourceRelativePath);\n  }\n  throw new Error(`Unknown install content transform: ${operation.contentTransform}`);\n}\n\nfunction getExpectedCopyFileContent(operation, content, linkIndex) {\n  const transformed = transformCopyFileContent(operation, content);\n  if (!linkIndex || !operation.sourceRelativePath || !isMarkdownPath(operation.destinationPath)) {\n    return transformed;\n  }\n  return rewriteRelativeLinks(transformed, {\n    sourceRel: operation.sourceRelativePath,\n    index: linkIndex,\n  });\n}\n\nfunction isPlainObject(value) {\n  return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction cloneJsonValue(value) {","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/affaan-m/ECC/blob/d8409a4b0813771235555e32e3d8046a73988bfa/scripts/lib/install-lifecycle.js#L169-L205","documentation":"During install/repair/verification, a copy-file operation may declare a contentTransform that rewrites content as it is copied. transformCopyFileContent() in scripts/lib/install-lifecycle.js supports exactly one value: 'antigravity-agent-frontmatter'. Any other non-empty contentTransform falls through to the final throw.","triggerScenarios":"An operation/manifest carrying \"contentTransform\": \"antigravity-frontmatter\" (typo), a newly invented transform name, or a transform name emitted by a newer ECC version being executed by older scripts/lib/install-lifecycle.js.","commonSituations":"Version skew: manifests regenerated by new code but old scripts still cached/installed (or vice versa); hand-editing manifests; adding a new transform to the executor without updating the lifecycle/verify side.","solutions":["Correct or remove the contentTransform property so it is exactly 'antigravity-agent-frontmatter' or absent","If the name looks like a real new transform, bring scripts/ and manifests/ to the same repo ref (git pull both, reinstall the package)","Re-run npm run catalog:sync so manifests are regenerated from the current code","Search for the bad value with rg \"contentTransform\" to find the generating entry"],"exampleFix":"// before — manifest operation\n{ \"source\": \"agents/foo.md\", \"contentTransform\": \"antigravity-frontmatter\" }\n\n// after\n{ \"source\": \"agents/foo.md\", \"contentTransform\": \"antigravity-agent-frontmatter\" }","handlingStrategy":"validation","validationCode":"const SUPPORTED_TRANSFORMS = new Set(['antigravity-agent-frontmatter']);\nfunction assertSupportedTransform(operation) {\n  const t = operation.contentTransform;\n  if (t !== undefined && !SUPPORTED_TRANSFORMS.has(t)) {\n    throw new Error(`contentTransform '${t}' is not supported here; supported: ${[...SUPPORTED_TRANSFORMS].join(', ')}`);\n  }\n}","typeGuard":"function isSupportedContentTransform(value) {\n  return value === undefined || value === 'antigravity-agent-frontmatter';\n}","tryCatchPattern":"try {\n  await install(operations);\n} catch (err) {\n  if (/Unknown install content transform/.test(err.message)) {\n    // manifest/scripts version skew: align repo refs and re-run, or drop the transform\n    throw new Error('Version skew: regenerate manifests or update scripts to the same ref');\n  }\n  throw err;\n}","preventionTips":["Keep scripts/ and manifests/ at the same git ref; regenerate manifests whenever scripts change","Treat transform names as an API contract — search for all call sites before renaming","Add a test enumerating every contentTransform value in manifests against the supported set"],"tags":["install","manifest","transform","whitelist","version-skew"],"backgroundTag":"unsupported-config-value","analyzedSha":"d8409a4b0813771235555e32e3d8046a73988bfa","analyzedAt":"2026-08-26T12:15:34.022Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}