{"record":{"id":"1281484b68c86c21","repo":"Fission-AI/OpenSpec","slug":"cannot-fork-schema-with-linked-or-unsupported-entr","errorCode":null,"errorMessage":"Cannot fork schema with linked or unsupported entry: ${sourcePath}: ${detail}","messagePattern":"Cannot fork schema with linked or unsupported entry: (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/commands/schema.ts","lineNumber":256,"sourceCode":"/**\n * Validate schema name format (kebab-case).\n */\nfunction isValidSchemaName(name: string): boolean {\n  return /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/.test(name);\n}\n\n/**\n * Copy a directory recursively.\n */\nfunction resolveSchemaCopyPath(allowedRoot: string, sourcePath: string): string {\n  try {\n    const canonicalRoot = fs.realpathSync(allowedRoot);\n    const canonicalPath = fs.realpathSync(sourcePath);\n    FileSystemUtils.assertPathWithin(canonicalRoot, canonicalPath);\n    return canonicalPath;\n  } catch (error) {\n    const detail = error instanceof Error ? error.message : String(error);\n    throw new Error(\n      `Cannot fork schema with linked or unsupported entry: ${sourcePath}: ${detail}`,\n      { cause: error }\n    );\n  }\n}\n\nfunction copyDirRecursive(\n  src: string,\n  dest: 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  fs.mkdirSync(dest, { recursive: true });","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/commands/schema.ts#L238-L274","documentation":"Error \"Cannot fork schema with linked or unsupported entry: ${sourcePath}: ${detail}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/commands/schema.ts:256 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"}