{"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":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/install-lifecycle.js","lineNumber":233,"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":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/install-lifecycle.js#L215-L251","documentation":"transformCopyFileContent applies a named content transform to a file's content during a copy-file install operation. The library only recognizes the built-in transform 'antigravity-agent-frontmatter'; if an operation record carries a contentTransform value it does not know, it refuses to guess and throws. This guards against silently copying a file whose content was meant to be adapted (e.g. frontmatter rewritten for a different agent harness).","triggerScenarios":"A copy-file operation (from install-state, manifests/install-components.json, or repair hydration) has a non-empty operation.contentTransform string that is not exactly 'antigravity-agent-frontmatter' — e.g. a typo like 'antigravity-agent-fronmatter', a transform added in a newer ECC version while running an older script, or hand-edited install state.","commonSituations":"Hand-editing or tooling-mutating the install state file and introducing a new transform name; running an older checkout of ECC against state written by a newer version that introduced additional transforms; a contributor adding a new transform to operation data without implementing it in transformCopyFileContent.","solutions":["Log or inspect the operation's contentTransform value and correct the spelling so it matches 'antigravity-agent-frontmatter' exactly.","Remove the contentTransform field from the operation if no transformation is actually needed (the source content will be copied verbatim).","Update the ECC checkout to the version that defines the transform used by the operation record.","If a new transform is genuinely required, add a branch in transformCopyFileContent (scripts/lib/install-lifecycle.js:233) that dispatches to an adapter function, mirroring the adaptAntigravityAgent branch."],"exampleFix":"// before (install-state / operation data)\n{ \"kind\": \"copy-file\", \"contentTransform\": \"antigravity-agent-frontmatter2\", ... }\n\n// after\n{ \"kind\": \"copy-file\", \"contentTransform\": \"antigravity-agent-frontmatter\", ... }","handlingStrategy":"validation","validationCode":"const KNOWN_TRANSFORMS = ['antigravity-agent-frontmatter'];\nfunction assertKnownTransform(op) {\n  if (op.contentTransform && !KNOWN_TRANSFORMS.includes(op.contentTransform)) {\n    throw new Error(`Unsupported contentTransform: ${op.contentTransform}`);\n  }\n}","typeGuard":"function hasKnownTransform(op) {\n  return !op.contentTransform || op.contentTransform === 'antigravity-agent-frontmatter';\n}","tryCatchPattern":"try {\n  install(operations);\n} catch (err) {\n  if (/Unknown install content transform/.test(err.message)) {\n    console.error(`Fix or drop contentTransform in: ${err.message}`);\n  } else throw err;\n}","preventionTips":["Treat contentTransform as an enum: only assign values the installed library version defines.","Validate operation records with a schema (enum of allowed transforms) before running installs.","Keep ECC checkout and install-state versions in sync; reinstall after upgrades."],"tags":["install","configuration","unsupported-transform"],"backgroundTag":"invalid-enum-value","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"}