{"record":{"id":"69df8a8e49a31d90","repo":"Fission-AI/OpenSpec","slug":"invalid-schema-at-schemapath-err-message","errorCode":null,"errorMessage":"Invalid schema at '${schemaPath}': ${err.message}","messagePattern":"Invalid schema at '(.+?)': (.+?)","errorType":"exception","errorClass":"SchemaLoadError","httpStatus":null,"severity":"error","filePath":"src/core/artifact-graph/resolver.ts","lineNumber":213,"sourceCode":"\n  // Load and parse the schema\n  let content: string;\n  try {\n    content = fs.readFileSync(schemaPath, 'utf-8');\n  } catch (err) {\n    const ioError = err instanceof Error ? err : new Error(String(err));\n    throw new SchemaLoadError(\n      `Failed to read schema at '${schemaPath}': ${ioError.message}`,\n      schemaPath,\n      ioError\n    );\n  }\n\n  try {\n    return parseSchema(content);\n  } catch (err) {\n    if (err instanceof SchemaValidationError) {\n      throw new SchemaLoadError(\n        `Invalid schema at '${schemaPath}': ${err.message}`,\n        schemaPath,\n        err\n      );\n    }\n    const parseError = err instanceof Error ? err : new Error(String(err));\n    throw new SchemaLoadError(\n      `Failed to parse schema at '${schemaPath}': ${parseError.message}`,\n      schemaPath,\n      parseError\n    );\n  }\n}\n\n/**\n * Lists all available schema names.\n * Combines project-local, user override, and package built-in schemas.\n *","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/artifact-graph/resolver.ts#L195-L231","documentation":"The schema YAML was read successfully but failed structural validation: parseSchema raised a SchemaValidationError (Zod issues), which is re-wrapped as a SchemaLoadError with the offending path and the original error as cause.","triggerScenarios":"Thrown at src/core/artifact-graph/resolver.ts:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Open the schema file at the reported path and fix the validation issues listed in the message","Compare the file against the expected artifact schema shape (artifacts with id, requires, etc.)","Validate the YAML syntax first, then re-run to confirm the structural errors are resolved"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","contentChangedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}