{"record":{"id":"626726b1ccdb3582","repo":"affaan-m/ECC","slug":"unable-to-read-label","errorCode":null,"errorMessage":"unable to read ${label}","messagePattern":"unable to read (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/validate-skills.js","lineNumber":302,"sourceCode":"\n  return { fatal: false };\n}\n\n/**\n * Find every SKILL.md under docs/{locale}/skills/*, mirroring the\n * curated skills/ layout one locale directory deeper.\n *\n * @param {string} docsDir\n * @returns {Array<{skillMd: string, label: string}>}\n */\nfunction findDocsSkillFiles(docsDir) {\n  if (!fs.existsSync(docsDir)) return [];\n\n  const readDirectories = (directory, label) => {\n    try {\n      return fs.readdirSync(directory, { withFileTypes: true });\n    } catch {\n      throw new Error(`unable to read ${label}`);\n    }\n  };\n\n  const locales = readDirectories(docsDir, 'docs directory')\n    .filter(e => e.isDirectory() && !e.name.startsWith('.'))\n    .map(e => e.name);\n\n  return locales.flatMap(locale => {\n    const localeSkillsDir = path.join(docsDir, locale, 'skills');\n    if (!fs.existsSync(localeSkillsDir)) return [];\n\n    const skillDirs = readDirectories(localeSkillsDir, `docs/${locale}/skills directory`)\n      .filter(e => e.isDirectory() && !e.name.startsWith('.'))\n      .map(e => e.name);\n\n    return skillDirs.map(skillDir => ({\n      skillMd: path.join(localeSkillsDir, skillDir, 'SKILL.md'),\n      label: `docs/${locale}/skills/${skillDir}/SKILL.md`","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/validate-skills.js#L284-L320","documentation":"findDocsSkillFiles' inner readDirectories helper throws when fs.readdirSync fails on a docs locale or skills directory (permission problem, missing dir raced away). The faulting input is the directory named by `label`, e.g. 'docs directory'.","triggerScenarios":"Thrown at scripts/ci/validate-skills.js:302 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the docs directory exists and is readable by the current user.","Recreate the locale directory if it was deleted mid-run.","Run with elevated permissions only if the directory ownership demands it."],"exampleFix":null,"handlingStrategy":"try-catch","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"}