{"record":{"id":"4d05ed7689a92f70","repo":"santifer/career-ops","slug":"report-saved-but-could-not-merge-tracker-add","errorCode":null,"errorMessage":"⚠️   Report saved, but could not merge tracker addition into data/applications.md: ${err.message}","messagePattern":"⚠️   Report saved, but could not merge tracker addition into data/applications\\.md: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gemini-eval.mjs","lineNumber":455,"sourceCode":"      console.log(`\\n✅  Report saved: reports/${filename}`);\n      console.log(`📊  Tracker addition saved: batch/tracker-additions/${num}-${companySlug}.tsv`);\n      reportSaved = true;\n    } catch (err) {\n      console.warn(`⚠️   Could not save report: ${err.message}`);\n      process.exitCode = 1;\n    }\n\n    if (reportSaved) {\n      try {\n        const mergeOutput = execFileSync(process.execPath, [join(ROOT, 'merge-tracker.mjs')], {\n          cwd: ROOT,\n          encoding: 'utf-8',\n          stdio: ['ignore', 'pipe', 'pipe'],\n        });\n        if (mergeOutput.trim()) console.log(mergeOutput.trim());\n        console.log('📊  Tracker merged into data/applications.md.');\n      } catch (err) {\n        console.warn(`⚠️   Report saved, but could not merge tracker addition into data/applications.md: ${err.message}`);\n        process.exitCode = 1;\n      }\n    }\n  } finally {\n    if (reservedNumbers.length > 0) {\n      try {\n        await releaseReportNumbers(reservedNumbers, { rootDir: ROOT, reportsDir: PATHS.reports });\n      } catch (err) {\n        console.warn(`⚠️   Could not release report reservation: ${err.message}`);\n      }\n    }\n  }\n}\n\nconsole.log('\\n' + '─'.repeat(66));\nconsole.log(`  Score: ${score}/5  |  Archetype: ${archetype}  |  Legitimacy: ${legitimacy}`);\nconsole.log('─'.repeat(66) + '\\n');\n","sourceCodeStart":437,"sourceCodeEnd":473,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/gemini-eval.mjs#L437-L473","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-run the merge manually once nothing else touches the tracker: `node merge-tracker.mjs`","Read err.message first: lock contention says 'wait and retry', format errors say 'fix the tracker row it names'","Verify the result with `node verify-pipeline.mjs` after a successful merge","Avoid running concurrent tracker-writing commands in the same clone"],"exampleFix":"# before: gemini-eval prints the warning and exits 1\n# after\nnode merge-tracker.mjs   # fold the saved TSV into data/applications.md\nnode verify-pipeline.mjs  # confirm tracker health","handlingStrategy":"retry","validationCode":"// Pre-flight: ensure the merge child can run and the tracker is present\nimport { existsSync } from 'node:fs';\nif (!existsSync('merge-tracker.mjs') || !existsSync('data/applications.md')) {\n  console.error('merge prerequisites missing');\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":"try {\n  execFileSync(process.execPath, ['merge-tracker.mjs'], { cwd: ROOT });\n} catch (err) {\n  // artifacts already saved — retry the merge later, don't re-evaluate\n  console.warn(`merge deferred: ${err.message}`);\n  queueManualStep('node merge-tracker.mjs');\n}","preventionTips":["After this warning, run `node merge-tracker.mjs` manually once the tracker is idle","Never run two tracker-writing commands (gemini-eval, set-status, merge) concurrently in one clone","Follow up with `node verify-pipeline.mjs` to confirm the merge landed cleanly"],"tags":["tracker","subprocess","merge","file-lock"],"backgroundTag":"subprocess-failed","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}