{"record":{"id":"459c972137036069","repo":"santifer/career-ops","slug":"skipping-filename-invalid-entry-number","errorCode":null,"errorMessage":"⚠️  Skipping ${filename}: invalid entry number","messagePattern":"⚠️  Skipping (.+?): invalid entry number","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"merge-tracker.mjs","lineNumber":723,"sourceCode":"      num: parseInt(parts[0]),\n      date: parts[1],\n      company: parts[2],\n      role: parts[3],\n      status: validateStatus(resolved.status),\n      // Write-canonical: strip any markdown bold so the stored score stays\n      // unbolded (verify-pipeline rejects bold scores).\n      score: resolved.score.replace(/\\*\\*/g, '').trim(),\n      pdf: parts[6],\n      report: parts[7],\n      notes: parts[8] || '',\n    };\n    const extras = parseTsvExtras(parts, filename);\n    if (!extras) return null;\n    Object.assign(addition, extras);\n  }\n\n  if (isNaN(addition.num) || addition.num === 0) {\n    console.warn(`⚠️  Skipping ${filename}: invalid entry number`);\n    return null;\n  }\n\n  return addition;\n}\n\n// ---- Main ----\n\n// Read applications.md\nif (!existsSync(APPS_FILE)) {\n  console.log('No applications.md found. Nothing to merge into.');\n  process.exit(0);\n}\nconst appContent = readFileSync(APPS_FILE, 'utf-8');\n// Test-only synchronization hook: the concurrent merge test waits for the\n// first worker to read the tracker while still holding the lock, then starts a\n// second worker to prove the lock prevents the old lost-update race.\nif (MERGE_READY_IPC && typeof process.send === 'function') {","sourceCodeStart":705,"sourceCodeEnd":741,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/merge-tracker.mjs#L705-L741","documentation":"Final structural check in parseTsvContent(): the entry number must parse to a nonzero integer. NaN (non-numeric first cell, e.g. a header line or placeholder) or 0 fails `isNaN(addition.num) || addition.num === 0`, and the whole additions file is skipped with this warning.","triggerScenarios":"A TSV whose first cell is 'num', 'N/A', empty, or '0' — parseInt yields NaN or 0 and the file is rejected after all other parsing succeeded.","commonSituations":"A header row left at the top of the additions file; report numbers reserved but never filled in; a placeholder like '-' typed where the entry number belongs.","solutions":["Put a real positive integer report number in column 1 (reserve ranges with `node reserve-report-num.mjs --count N` for parallel workers)","Delete header/comment lines from the TSV before merging","Re-run node merge-tracker.mjs and confirm the file merges"],"exampleFix":"# before\nnum\tdate\tcompany\trole\tstatus\tscore\tpdf\treport\tnotes\n\n# after (header line removed)\n042\t2026-08-20\tAcme\tSRE\tInterview\t4.2/5\t✅\t[042](reports/042-acme-2026-08-20.md)\tnote","handlingStrategy":"validation","validationCode":"function hasValidEntryNumber(line) {\n  const n = Number.parseInt(line.split('\\t')[0], 10);\n  return Number.isInteger(n) && n > 0;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reserve report numbers with `node reserve-report-num.mjs --count N` before parallel workers write TSVs","Never leave header or placeholder lines in additions files"],"tags":["tracker","entry-number","tsv-parsing","merge","warning"],"backgroundTag":"invalid-entry-id","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}