santifer/career-ops · warning

⚠️ — batch reports report # but no reports/ -*.md found…

Error message

⚠️  ${s.url} — batch reports report #${s.reportNum} but no reports/${s.reportNum}-*.md found; left in Pendientes.

What it means

reconcile-pipeline.md moves batch-produced URLs out of pipeline.md's pending list (Pendientes) once their report file exists. When a batch row claims report #N but no reports/N-*.md file can be found, the row cannot be validated, so it is left in Pendientes and this warning names both the URL and the missing report number.

Solutions

  1. Check reports/ for the file matching the report number (glob N-*). If it exists under an unexpected name, fix the row's reference or rename the report.
  2. If the report truly was never produced, re-run the evaluation for that URL so the report is written, then re-run reconcile.
  3. If the offer is dead or unwanted, remove the row from pipeline.md manually or mark it discarded.
  4. Verify no parallel reservation (`node reserve-report-num.mjs`) is still holding the number with a stale sentinel.

Example fix

// before
// pipeline.md row: batch wrote report #47 reference, reports/ has no 47-*.md
// after: regenerate the report
node reserve-report-num.mjs --release 047
# re-run the evaluation for that URL, then:
node reconcile-pipeline.mjs
Defensive patterns

Strategy: validation

Validate before calling

const expected = `reports/${String(num).padStart(3, '0')}-`;
if (!fs.readdirSync('reports').some(f => f.startsWith(expected))) {
  console.warn(`report #${num} missing before reconcile`);
}

Try / catch

for (const s of skippedNoReport) {
  console.warn(`⚠️  ${s.url} — report #${s.reportNum} not found; left in Pendientes`);
}
// resolve by regenerating or removing the row before the next reconcile

Prevention

When it happens

Trigger: A batch worker crashed or was killed after writing the pipeline note/reservation but before writing reports/{num}-*.md; the report file was deleted or moved; a reserved report number was never claimed; wrong reportNum recorded in the row.

Common situations: Interrupted parallel batch runs (reservation released or leaked after a failure); manual cleanup of reports/; typos in a hand-edited pipeline.md entry.

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 santifer/career-ops@aac998c7ed (2026-09-16). Data as JSON: /api/errors/c4acc88702c8e2f4. Report an issue: GitHub.

Appendix: source

Thrown at reconcile-pipeline.mjs:243

  const parts = body.split('|').map(s => s.trim());
  const company = parts[1] || '';
  const role = parts[2] || '';
  const score = resolveScore(done.score, reportFile);
  const pdf = resolvePdf(reportFile);
  const num = parseInt(done.reportNum, 10);

  const reportLink = normalizeReportLink(`[${num}](reports/${reportFile})`, dirname(PIPELINE_FILE), CAREER_OPS);
  movedProcLines.push(`- [x] ${reportLink} | ${url} | ${company} | ${role} | ${score} | PDF ${pdf}`);
  moved.push({ url, company, role, num, score });
  procUrls.add(url);
  removeIdx.add(i);
}

// ---- report & exit early if nothing changed ----
console.log('=== Reconcile pipeline.md ===');
for (const s of skippedNoReport) {
  console.warn(`⚠️  ${s.url} — batch reports report #${s.reportNum} but no reports/${s.reportNum}-*.md found; left in Pendientes.`);
}

if (removeIdx.size === 0) {
  console.log('✅ pipeline.md already in sync — nothing to reconcile.');
  process.exit(0);
}

// ---- rebuild the file ----
const out = [];
let skipBlankAfterProc = false;
for (let i = 0; i < lines.length; i++) {
  if (removeIdx.has(i)) continue;
  if (skipBlankAfterProc) {
    skipBlankAfterProc = false;
    if (lines[i].trim() === '') continue; // drop the original blank after "## Procesadas"
  }
  out.push(lines[i]);
  if (i === procStart && movedProcLines.length > 0) {

View on GitHub (pinned to aac998c7ed)