{"record":{"id":"ffa52c64ad9b6c55","repo":"affaan-m/ECC","slug":"source-is-missing-the-catalog-count-description","errorCode":null,"errorMessage":"${source} is missing the catalog count description","messagePattern":"(.+?) is missing the catalog count description","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/catalog.js","lineNumber":341,"sourceCode":"      expected: Number(match[1]),\n      source: `${pattern.source} (${pattern.category})`\n    });\n  }\n\n  return expectations;\n}\n\nfunction parseCatalogDescriptionExpectations(content, source, getDescription) {\n  let parsed;\n  try {\n    parsed = JSON.parse(content);\n  } catch (error) {\n    throw new Error(`${source} is not valid JSON: ${error.message}`);\n  }\n\n  const description = getDescription(parsed);\n  if (typeof description !== 'string') {\n    throw new Error(`${source} is missing the catalog count description`);\n  }\n\n  const match = description.match(/(\\d+)\\s+agents,\\s+(\\d+)\\s+skills,\\s+(\\d+)\\s+legacy command shims?/i);\n  if (!match) {\n    throw new Error(`${source} is missing the catalog count description`);\n  }\n\n  return [\n    { category: 'agents', mode: 'exact', expected: Number(match[1]), source },\n    { category: 'skills', mode: 'exact', expected: Number(match[2]), source },\n    { category: 'commands', mode: 'exact', expected: Number(match[3]), source },\n  ];\n}\n\nfunction evaluateExpectations(catalog, expectations) {\n  return expectations.map(expectation => {\n    const actual = catalog[expectation.category].count;\n    const ok = expectation.mode === 'minimum'","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/catalog.js#L323-L359","documentation":"parseCatalogDescriptionExpectations throws when the parsed JSON's description (retrieved via the getDescription callback) is not a string, meaning the manifest lacks or mistypes the field holding the catalog count sentence. The faulting input is the description property in the JSON at `source`.","triggerScenarios":"Thrown at scripts/ci/catalog.js:341 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add or correct the description field so it is a string containing the counts sentence.","Check that getDescription points at the right property path for this manifest shape.","Run the catalog write mode to sync the description with actual counts."],"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"}