santifer/career-ops · warning

⚠️ Report saved, but could not merge tracker addition into

Error message

⚠️   Report saved, but could not merge tracker addition into data/applications.md: ${err.message}

What it means

Warning from gemini-eval.mjs after the report and TSV were saved successfully: the subprocess `node merge-tracker.mjs` (execFileSync, cwd=ROOT) that folds the TSV into data/applications.md failed. The evaluation artifacts survive; only the tracker merge is missing, and exitCode becomes 1. The child's failure reason rides along in err.message.

Source

Thrown at gemini-eval.mjs:455

      console.log(`\n✅  Report saved: reports/${filename}`);
      console.log(`📊  Tracker addition saved: batch/tracker-additions/${num}-${companySlug}.tsv`);
      reportSaved = true;
    } catch (err) {
      console.warn(`⚠️   Could not save report: ${err.message}`);
      process.exitCode = 1;
    }

    if (reportSaved) {
      try {
        const mergeOutput = execFileSync(process.execPath, [join(ROOT, 'merge-tracker.mjs')], {
          cwd: ROOT,
          encoding: 'utf-8',
          stdio: ['ignore', 'pipe', 'pipe'],
        });
        if (mergeOutput.trim()) console.log(mergeOutput.trim());
        console.log('📊  Tracker merged into data/applications.md.');
      } catch (err) {
        console.warn(`⚠️   Report saved, but could not merge tracker addition into data/applications.md: ${err.message}`);
        process.exitCode = 1;
      }
    }
  } finally {
    if (reservedNumbers.length > 0) {
      try {
        await releaseReportNumbers(reservedNumbers, { rootDir: ROOT, reportsDir: PATHS.reports });
      } catch (err) {
        console.warn(`⚠️   Could not release report reservation: ${err.message}`);
      }
    }
  }
}

console.log('\n' + '─'.repeat(66));
console.log(`  Score: ${score}/5  |  Archetype: ${archetype}  |  Legitimacy: ${legitimacy}`);
console.log('─'.repeat(66) + '\n');

View on GitHub (pinned to 60398d6549)

Solutions

  1. Re-run the merge manually once nothing else touches the tracker: `node merge-tracker.mjs`
  2. Read err.message first: lock contention says 'wait and retry', format errors say 'fix the tracker row it names'
  3. Verify the result with `node verify-pipeline.mjs` after a successful merge
  4. Avoid running concurrent tracker-writing commands in the same clone

Example fix

# before: gemini-eval prints the warning and exits 1
# after
node merge-tracker.mjs   # fold the saved TSV into data/applications.md
node verify-pipeline.mjs  # confirm tracker health
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight: ensure the merge child can run and the tracker is present
import { existsSync } from 'node:fs';
if (!existsSync('merge-tracker.mjs') || !existsSync('data/applications.md')) {
  console.error('merge prerequisites missing');
  process.exit(1);
}

Try / catch

try {
  execFileSync(process.execPath, ['merge-tracker.mjs'], { cwd: ROOT });
} catch (err) {
  // artifacts already saved — retry the merge later, don't re-evaluate
  console.warn(`merge deferred: ${err.message}`);
  queueManualStep('node merge-tracker.mjs');
}

Prevention

When it happens

Trigger: merge-tracker.mjs aborting on a locked tracker (shared lock held by a concurrent set-status/merge run), a malformed/ambiguous tracker row, a report-link or URL-mismatch rejection, or the child crashing (ENOENT for the script path after a partial install). Happens only on the reportSaved path.

Common situations: Two career-ops commands racing on the same clone; a hand-edited data/applications.md that violates the table format; running gemini-eval from a broken checkout where merge-tracker.mjs is missing.

Related errors


AI-assisted analysis of santifer/career-ops@60398d6549 (2026-08-20). Data as JSON: /api/errors/4d05ed7689a92f70. Report an issue: GitHub.