{"record":{"id":"98443335740ee61f","repo":"santifer/career-ops","slug":"filename-ignoring-unrecognized-header-column-s-unknown-join","errorCode":null,"errorMessage":"⚠️  ${filename}: ignoring unrecognized header column(s): ${unknown.join(', ')}","messagePattern":"⚠️  (.+?): ignoring unrecognized header column\\(s\\): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"merge-tracker.mjs","lineNumber":795,"sourceCode":" * @param {string[]} lines - Non-empty lines of the addition file.\n * @param {string} filename - Source filename used in warning messages.\n * @returns {object|null} Parsed tracker addition, or null when malformed.\n */\nfunction parseHeadedAddition(lines, filename) {\n  const { map, missing, duplicates, unknown } = resolveTsvColumns(splitAdditionCells(lines[0]));\n  if (duplicates.length) {\n    console.warn(`⚠️  Skipping ${filename}: header labels the same column twice (${[...new Set(duplicates)].join(', ')}) — refusing to guess which one carries the value`);\n    return null;\n  }\n  if (missing.length) {\n    console.warn(`⚠️  Skipping ${filename}: header is missing required column(s): ${missing.join(', ')}`);\n    return null;\n  }\n  if (unknown.length) {\n    // Not fatal: an unrecognized label is a column this version has no meaning\n    // for, and dropping it loses nothing the tracker could store anyway. Say so\n    // rather than swallowing it, since the usual cause is a typo'd label.\n    console.warn(`⚠️  ${filename}: ignoring unrecognized header column(s): ${unknown.join(', ')}`);\n  }\n\n  const dataLines = lines.slice(1);\n  if (dataLines.length === 0) {\n    console.warn(`⚠️  Skipping ${filename}: header row with no data row`);\n    return null;\n  }\n  if (dataLines.length > 1) {\n    // One addition per file is the contract every caller assumes (the merge\n    // loop takes one addition per TSV). Rejecting is louder than merging the\n    // first row and dropping the rest, which would lose evaluations silently.\n    console.warn(`⚠️  Skipping ${filename}: ${dataLines.length} data rows — one addition per file`);\n    return null;\n  }\n\n  const parts = splitAdditionCells(dataLines[0]);\n  // Only the REQUIRED cells must actually be there. A row whose trailing\n  // optional value is empty is routinely written without its final tab —","sourceCodeStart":777,"sourceCodeEnd":813,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/merge-tracker.mjs#L777-L813","documentation":"When parseHeadedAddition() finds header labels this version has no meaning for, it does NOT skip the file — it warns and ignores those columns, since unrecognized data can't be stored anyway. The usual cause is a typo'd label, so the warning exists to surface it instead of silently dropping the column's data.","triggerScenarios":"A tracker-addition TSV header containing a label outside the recognized set (required: num, date, company, role, score, status, pdf, report; optional: notes, via, location, url) — typically misspellings like 'compnay' or invented fields like 'salary_note'.","commonSituations":"Typos in hand-written headers; schema drift from a customized local template; fields from another tracker format that career-ops doesn't define.","solutions":["Fix the typo'd label to the correct recognized name so the column's data is merged","Remove columns that genuinely carry no tracker meaning","Check the recognized label list in AGENTS.md before inventing new columns"],"exampleFix":"// before\nnum\\tdate\\tcompnay\\trole\\t...\n// after\nnum\\tdate\\tcompany\\trole\\t...","handlingStrategy":"validation","validationCode":"const KNOWN = ['num','date','company','role','score','status','pdf','report','notes','via','location','url'];\nconst unknown = headerRow.split('\\t').filter(l => !KNOWN.includes(l.trim().toLowerCase()));\nif (unknown.length) console.error('Typo or unsupported column:', unknown);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Spell header labels exactly as documented in AGENTS.md","Route custom metadata into the notes column rather than new columns","Read merge-tracker warnings after each batch — 'ignoring unrecognized column' almost always means a typo"],"tags":["tsv","header-validation","unknown-column","tracker"],"backgroundTag":"schema-validation-failed","analyzedSha":"aac998c7ed7248ea853b720ceeb1fdbeb322fc5d","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}