{"record":{"id":"fb1981aa068c401b","repo":"affaan-m/ECC","slug":"normalizepath-path-relative-root-outputpath-is-out-of-date","errorCode":null,"errorMessage":"${normalizePath(path.relative(ROOT, outputPath))} is out of date; run npm run command-registry:write","messagePattern":"(.+?) is out of date; run npm run command-registry:write","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/generate-command-registry.js","lineNumber":227,"sourceCode":"}\n\nfunction writeRegistry(registry, outputPath = DEFAULT_OUTPUT_PATH) {\n  fs.mkdirSync(path.dirname(outputPath), { recursive: true });\n  fs.writeFileSync(outputPath, formatRegistry(registry), 'utf8');\n}\n\nfunction checkRegistry(registry, outputPath = DEFAULT_OUTPUT_PATH) {\n  const expected = formatRegistry(registry);\n  let current;\n\n  try {\n    current = fs.readFileSync(outputPath, 'utf8');\n  } catch (error) {\n    throw new Error(`Failed to read ${normalizePath(path.relative(ROOT, outputPath))}: ${error.message}`);\n  }\n\n  if (current !== expected) {\n    throw new Error(`${normalizePath(path.relative(ROOT, outputPath))} is out of date; run npm run command-registry:write`);\n  }\n}\n\nfunction formatTextSummary(registry) {\n  const lines = [\n    'Command registry statistics',\n    '',\n    `Total commands: ${registry.totalCommands}`,\n    '',\n    'By type:',\n  ];\n\n  for (const [type, count] of Object.entries(registry.statistics.byType)) {\n    lines.push(`  ${type}: ${count}`);\n  }\n\n  lines.push('', 'Top agents:');\n  for (const { agent, count } of registry.statistics.topAgents) {","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/generate-command-registry.js#L209-L245","documentation":"checkRegistry throws when the generated registry differs byte-for-byte from the file on disk, i.e. the committed command-registry artifact is stale relative to current commands/agents/skills. It is a drift detector, not a corruption error.","triggerScenarios":"Thrown at scripts/ci/generate-command-registry.js:227 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run `npm run command-registry:write` to regenerate and commit the updated registry.","If the diff is unexpected, inspect recent command/agent/skill changes for accidental registry entries.","Re-run check mode to confirm the registry matches before committing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}