santifer/career-ops · error

⚠️ Skipping : report # is marked "failed" in…

Error message

⚠️  Skipping ${file}: report #${reportNum} is marked "failed" in batch-state.tsv — refusing to merge a tracker line for an offer the batch runner itself recorded as failed (possible fabricated result)

What it means

batch-state.tsv records which batch workers failed. If a tracker addition references a report number the batch runner itself marked 'failed', the line is almost certainly a fabricated result from a hallucinating worker, so merge-tracker.mjs skips it and increments the skipped counter rather than merging a tracker row for an offer that never completed evaluation.

Solutions

  1. Delete or fix the offending TSV in batch/tracker-additions/ — do not merge a failed evaluation.
  2. Re-run the failed evaluation (reserve a fresh number with node reserve-report-num.mjs) and let the new worker write a clean TSV.
  3. Inspect the worker's output/logs to confirm whether the failure was transient before regenerating.
  4. If batch-state.tsv's 'failed' mark is stale/incorrect (the run actually succeeded), correct batch-state.tsv, then re-merge.

Example fix

# before
$ ls batch/tracker-additions/
042-acme.tsv        # report 042 marked failed
$ node merge-tracker.mjs   # ⚠️ skipped
# after
$ rm batch/tracker-additions/042-acme.tsv
$ node reserve-report-num.mjs --count 1   # e.g. 043
# re-run the worker for 043, then merge
Defensive patterns

Strategy: validation

Validate before calling

import { readFileSync } from 'node:fs';
const failed = new Set(readFileSync('batch/batch-state.tsv','utf8').split('\n').filter(l => l.includes('failed')).map(l => l.split('\t')[0]));
if (failed.has(reportNum)) throw new Error(`report #${reportNum} failed in batch — do not merge`);

Prevention

When it happens

Trigger: extractReportNum() pulls a report number from the addition's report link or notes and that number is in FAILED_REPORT_NUMBERS (loaded from batch-state.tsv) during the dedup pass.

Common situations: A batch worker crashed after reserving report #042 but still wrote a tracker-additions TSV (partially hallucinated content); a worker retried and succeeded under a new number while its stale first output lingers; running merge after an aborted batch run.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16). Data as JSON: /api/errors/31d18be9dc63a304. Report an issue: GitHub.

Appendix: source

Thrown at merge-tracker.mjs:1401

  // The TSV convention carries a root-relative `reports/...` link; rewrite it
  // so it resolves correctly when clicked from applications.md (see #760).
  addition.report = normalizeReportLink(addition.report);

  // Derive the key from the linked report when the TSV did not carry one, so a
  // row added through the normal nine-column flow is born WITH its key. This
  // must run before the dedup below reads addition.url — deriving it afterwards
  // would populate the column while leaving Pass 0 nothing to match on, which is
  // the original bug with extra steps.
  if (!addition.url) addition.url = resolveReportUrl(addition.report).url;

  // Check for duplicate by:
  // 0. Exact normalized posting URL (deterministic, authoritative)
  // 1. Exact report number match
  // 2. Company + role fuzzy match
  const reportNum = extractReportNum(addition.report, addition.notes);

  if (reportNum && FAILED_REPORT_NUMBERS.has(reportNum)) {
    console.warn(`⚠️  Skipping ${file}: report #${reportNum} is marked "failed" in batch-state.tsv — refusing to merge a tracker line for an offer the batch runner itself recorded as failed (possible fabricated result)`);
    skipped++;
    continue;
  }

  let duplicate = null;
  // True only for a tier-1 match (report number + company): the one heuristic
  // tier where the addition is provably the same evaluation as the existing
  // row, so its role title may replace the row's. Tier-2 (entry num) and
  // tier-3 (fuzzy role) matches keep the existing title — a fuzzy false
  // positive that also rewrites the title destroys the evidence that two reqs
  // were distinct. Pass 0 (URL) grants the same trust for the same reason; it
  // tracks that separately in `dupReason`.
  let reportNumMatched = false;

  // Pass 0 — the posting URL is the stable natural key. When it hits it is
  // authoritative and no heuristic runs. Tiers 1-3 below remain the fallback
  // for rows with no URL yet.
  const addUrl = normalizeUrl(addition.url);

View on GitHub (pinned to aac998c7ed)