{"record":{"id":"2a7273b2c35a65c2","repo":"midudev/autoskills","slug":"retry-report-not-found-report-path","errorCode":null,"errorMessage":"retry report not found: ${REPORT_PATH}","messagePattern":"retry report not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/autoskills/scripts/sync-skills.mjs","lineNumber":109,"sourceCode":"  for (const tech of SKILLS_MAP) for (const s of tech.skills) out.add(s);\n  for (const c of COMBO_SKILLS_MAP) for (const s of c.skills) out.add(s);\n  for (const s of FRONTEND_BONUS_SKILLS) out.add(s);\n  return [...out];\n}\n\nfunction getSkillName(skillPath) {\n  try {\n    const { skillName } = parseSkillPath(skillPath);\n    if (skillName) return skillName;\n  } catch {\n    // Reports may be edited manually; fall back to the final path segment.\n  }\n  return skillPath.split(\"/\").filter(Boolean).at(-1) || skillPath;\n}\n\nfunction collectRetryFailedSkillNames() {\n  if (!existsSync(REPORT_PATH)) {\n    throw new Error(`retry report not found: ${REPORT_PATH}`);\n  }\n\n  const report = JSON.parse(readFileSync(REPORT_PATH, \"utf-8\"));\n  const retry = new Set();\n  const add = (entry) => {\n    const skill = typeof entry === \"string\" ? entry : entry?.skill;\n    if (skill) retry.add(getSkillName(skill));\n  };\n\n  for (const entry of report.flagged || []) {\n    if (entry?.accepted) continue;\n    add(entry);\n  }\n  for (const entry of report.rejected || []) add(entry);\n  for (const entry of report.missing || []) add(entry);\n  for (const entry of report.errors || []) add(entry);\n\n  return retry;","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/midudev/autoskills/blob/0ec725320d2137253ab2e68e7ba8a072148e741a/packages/autoskills/scripts/sync-skills.mjs#L91-L127","documentation":"collectRetryFailedSkillNames reads the retry report file at REPORT_PATH to determine which skills failed and should be retried by the sync script. If the report file does not exist on disk, it throws this error naming the missing path, because there is no prior run result to build the retry set from.","triggerScenarios":"Running the retry path of scripts/sync-skills.mjs before any earlier run produced the report file (wrong path, wrong working directory, or the initial run was never executed).","commonSituations":"Running the retry command first instead of the initial sync; running from a different working directory so the relative REPORT_PATH doesn't resolve; deleting the report during cleanup; CI starting a fresh workspace without the prior run's artifact.","solutions":["Run the initial sync first so the retry report is generated at REPORT_PATH.","Run the script from the repository/package root so the relative REPORT_PATH resolves correctly.","Check REPORT_PATH in the script matches where your earlier run wrote the report; pass or configure the correct path if supported.","If in CI, persist the report between jobs (artifact upload/download) before invoking the retry step."],"exampleFix":"// before (fresh CI job)\n$ node scripts/sync-skills.mjs --retry   // report missing\n\n// after\n- uses: actions/download-artifact@v4\n  with: { name: retry-report, path: . }   # restores report\n- run: node scripts/sync-skills.mjs --retry","handlingStrategy":"validation","validationCode":"import { existsSync, statSync } from \"node:fs\";\nfunction reportIsReady(path) {\n  return existsSync(path) && statSync(path).isFile() && statSync(path).size > 0;\n}\nif (!reportIsReady(REPORT_PATH)) {\n  throw new Error(`retry report missing at ${REPORT_PATH}; run the initial sync first`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const skills = collectRetryFailedSkillNames();\n} catch (e) {\n  if (e.message.startsWith(\"retry report not found\")) {\n    console.error(\"No previous run report — run the full sync first, or disable --retry.\");\n    process.exitCode = 2;\n  } else throw e;\n}","preventionTips":["Document that --retry requires a prior successful report-producing run.","Run the script from the package root so relative paths resolve.","In CI, upload/download the report as an artifact between jobs.","Check for the report's existence and fail with a friendly message before invoking the retry helper."],"tags":["file-not-found","script","workflow","missing-input"],"backgroundTag":"file-not-found","analyzedSha":"0ec725320d2137253ab2e68e7ba8a072148e741a","analyzedAt":"2026-09-15T14:12:31.090Z","contentChangedAt":"2026-09-15T14:12:31.090Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}