midudev/autoskills · error · Error

retry report not found

Error message

retry report not found: ${REPORT_PATH}

What it means

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.

Solutions

  1. Run the initial sync first so the retry report is generated at REPORT_PATH.
  2. Run the script from the repository/package root so the relative REPORT_PATH resolves correctly.
  3. Check REPORT_PATH in the script matches where your earlier run wrote the report; pass or configure the correct path if supported.
  4. If in CI, persist the report between jobs (artifact upload/download) before invoking the retry step.

Example fix

// before (fresh CI job)
$ node scripts/sync-skills.mjs --retry   // report missing

// after
- uses: actions/download-artifact@v4
  with: { name: retry-report, path: . }   # restores report
- run: node scripts/sync-skills.mjs --retry
Defensive patterns

Strategy: validation

Validate before calling

import { existsSync, statSync } from "node:fs";
function reportIsReady(path) {
  return existsSync(path) && statSync(path).isFile() && statSync(path).size > 0;
}
if (!reportIsReady(REPORT_PATH)) {
  throw new Error(`retry report missing at ${REPORT_PATH}; run the initial sync first`);
}

Try / catch

try {
  const skills = collectRetryFailedSkillNames();
} catch (e) {
  if (e.message.startsWith("retry report not found")) {
    console.error("No previous run report — run the full sync first, or disable --retry.");
    process.exitCode = 2;
  } else throw e;
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of midudev/autoskills@0ec725320d (2026-09-15). Data as JSON: /api/errors/2a7273b2c35a65c2. Report an issue: GitHub.

Appendix: source

Thrown at packages/autoskills/scripts/sync-skills.mjs:109

  for (const tech of SKILLS_MAP) for (const s of tech.skills) out.add(s);
  for (const c of COMBO_SKILLS_MAP) for (const s of c.skills) out.add(s);
  for (const s of FRONTEND_BONUS_SKILLS) out.add(s);
  return [...out];
}

function getSkillName(skillPath) {
  try {
    const { skillName } = parseSkillPath(skillPath);
    if (skillName) return skillName;
  } catch {
    // Reports may be edited manually; fall back to the final path segment.
  }
  return skillPath.split("/").filter(Boolean).at(-1) || skillPath;
}

function collectRetryFailedSkillNames() {
  if (!existsSync(REPORT_PATH)) {
    throw new Error(`retry report not found: ${REPORT_PATH}`);
  }

  const report = JSON.parse(readFileSync(REPORT_PATH, "utf-8"));
  const retry = new Set();
  const add = (entry) => {
    const skill = typeof entry === "string" ? entry : entry?.skill;
    if (skill) retry.add(getSkillName(skill));
  };

  for (const entry of report.flagged || []) {
    if (entry?.accepted) continue;
    add(entry);
  }
  for (const entry of report.rejected || []) add(entry);
  for (const entry of report.missing || []) add(entry);
  for (const entry of report.errors || []) add(entry);

  return retry;

View on GitHub (pinned to 0ec725320d)