{"record":{"id":"34901276574aa82a","repo":"affaan-m/ECC","slug":"pattern-source-is-missing-the-pattern-category-row","errorCode":null,"errorMessage":"${pattern.source} is missing the ${pattern.category} row","messagePattern":"(.+?) is missing the (.+?) row","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/catalog.js","lineNumber":125,"sourceCode":"  }\n\n  expectations.push({\n    category: 'agents',\n    mode: 'exact',\n    expected: Number(projectTreeAgentsMatch[1]),\n    source: 'README.md project tree (agents)'\n  });\n\n  const tablePatterns = [\n    { category: 'agents', regex: /\\|\\s*(?:\\*\\*)?Agents(?:\\*\\*)?\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s+agents\\s*\\|/i, source: 'README.md comparison table' },\n    { category: 'commands', regex: /\\|\\s*(?:\\*\\*)?Commands(?:\\*\\*)?\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s+commands(?:\\s*\\([^)]*\\))?\\s*\\|/i, source: 'README.md comparison table' },\n    { category: 'skills', regex: /\\|\\s*(?:\\*\\*)?Skills(?:\\*\\*)?\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s+skills\\s*\\|/i, source: 'README.md comparison table' }\n  ];\n\n  for (const pattern of tablePatterns) {\n    const match = readmeContent.match(pattern.regex);\n    if (!match) {\n      throw new Error(`${pattern.source} is missing the ${pattern.category} row`);\n    }\n\n    expectations.push({\n      category: pattern.category,\n      mode: 'exact',\n      expected: Number(match[1]),\n      source: `${pattern.source} (${pattern.category})`\n    });\n  }\n\n  return expectations;\n}\n\nfunction parseZhRootReadmeExpectations(readmeContent) {\n  const match = readmeContent.match(/你现在可以使用\\s+(\\d+)\\s+个代理、\\s*(\\d+)\\s*个技能和\\s*(\\d+)\\s*个命令/i);\n  if (!match) {\n    throw new Error('README.zh-CN.md is missing the quick-start catalog summary');\n  }","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/catalog.js#L107-L143","documentation":"Generic guard inside parseReadmeExpectations' tablePatterns loop: thrown when a README comparison-table row for one category (agents, commands, or skills) is absent or reformatted so its per-category regex does not match. The faulting input is the comparison table row named by pattern.category.","triggerScenarios":"Thrown at scripts/ci/catalog.js:125 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restore the missing agents/commands/skills row in the README.md comparison table with the correct count.","Regenerate the table with the catalog write mode.","Update the tablePatterns regex if the row format (bold markers, checkmark prefixes, parenthetical notes) changed."],"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"}