{"record":{"id":"6d03162745250df0","repo":"Fission-AI/OpenSpec","slug":"cannot-fork-schema-with-linked-or-unsupported-entr-6d0316","errorCode":null,"errorMessage":"Cannot fork schema with linked or unsupported entry: ${entryPath}","messagePattern":"Cannot fork schema with linked or unsupported entry: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/commands/schema.ts","lineNumber":320,"sourceCode":"  src: string,\n  allowedRoot = src,\n  ancestors = new Set<string>()\n): void {\n  const canonicalSrc = resolveSchemaCopyPath(allowedRoot, src);\n  if (ancestors.has(canonicalSrc)) {\n    throw new Error(`Cannot fork schema with a linked directory cycle: ${src}`);\n  }\n  ancestors.add(canonicalSrc);\n\n  try {\n    for (const entry of fs.readdirSync(src, { withFileTypes: true })) {\n      const entryPath = path.join(src, entry.name);\n      const canonicalEntry = resolveSchemaCopyPath(allowedRoot, entryPath);\n      const stats = fs.statSync(canonicalEntry);\n      if (stats.isDirectory()) {\n        assertSchemaTreeCanBeCopied(canonicalEntry, allowedRoot, ancestors);\n      } else if (!stats.isFile()) {\n        throw new Error(`Cannot fork schema with linked or unsupported entry: ${entryPath}`);\n      }\n    }\n  } finally {\n    ancestors.delete(canonicalSrc);\n  }\n}\n\n/**\n * Produces a stable content fingerprint of a directory: a SHA-256 over every\n * file's relative path AND its bytes (plus directory paths), walked in sorted\n * order. Two directories with byte-identical trees produce the same digest, and\n * ANY change to a file's contents, size, or the set of paths changes it. Used to\n * detect a concurrent modification of a fork destination between the moment the\n * overwrite is authorized and the moment it is actually moved/deleted, so those\n * changes are never silently destroyed.\n */\nfunction fingerprintDir(dir: string): string {\n  const hash = createHash('sha256');","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/commands/schema.ts#L302-L338","documentation":"Error \"Cannot fork schema with linked or unsupported entry: ${entryPath}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/commands/schema.ts:320 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}