{"record":{"id":"62d7374626768f76","repo":"santifer/career-ops","slug":"skipping-malformed-pipe-delimited-filename","errorCode":null,"errorMessage":"⚠️  Skipping malformed pipe-delimited ${filename}: ${parts.length} fields","messagePattern":"⚠️  Skipping malformed pipe-delimited (.+?): (.+?) fields","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"merge-tracker.mjs","lineNumber":659,"sourceCode":"    location: untagged[0] || '',\n    url: urls[0] || '',\n  };\n}\n\nfunction parseTsvContent(content, filename) {\n  content = content.trim();\n  if (!content) return null;\n\n  let parts;\n  let addition;\n\n  // Detect pipe-delimited (markdown table row)\n  if (content.startsWith('|')) {\n    parts = content.split('|').map(s => s.trim());\n    if (parts[0] === '') parts.shift();\n    if (parts[parts.length - 1] === '') parts.pop();\n    if (parts.length < 8) {\n      console.warn(`⚠️  Skipping malformed pipe-delimited ${filename}: ${parts.length} fields`);\n      return null;\n    }\n    // Format: num | date | company | role | score | status | pdf | report | notes [| location]\n    // Identify score vs status by content, not position, so a swapped row can't\n    // merge silently (#1427).\n    const resolved = resolveScoreStatus(parts[4], parts[5]);\n    if (!resolved) {\n      console.warn(`⚠️  Skipping ${filename}: cannot tell score from status in columns 5–6 (\"${parts[4]}\" | \"${parts[5]}\") — refusing to merge a possible column swap`);\n      return null;\n    }\n    addition = {\n      num: parseInt(parts[0]),\n      date: parts[1],\n      company: parts[2],\n      role: parts[3],\n      // Write-canonical: the tracker stores scores unbolded (verify-pipeline\n      // rejects bold scores), so strip any markdown bold from the incoming cell.\n      score: resolved.score.replace(/\\*\\*/g, '').trim(),","sourceCodeStart":641,"sourceCodeEnd":677,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/merge-tracker.mjs#L641-L677","documentation":"When a batch/tracker-additions file's single line starts with '|', merge-tracker.mjs parses it as a markdown table row. After stripping the leading/trailing empty cells from the split, fewer than 8 remaining fields means required data is missing, so the file is skipped with this field-count warning rather than merged with shifted columns.","triggerScenarios":"A pipe-delimited row supplying only 7 cells — e.g. a missing pdf or report column — makes parts.length < 8 after the boundary empty cells are shifted/popped, and the addition is rejected.","commonSituations":"Hand-building a markdown-table-style row and forgetting the pdf ✅/❌ or report link column; a table row copied with a truncated last cell; template drift where a column was dropped.","solutions":["Rewrite the row with all required columns: num, date, company, role, score, status, pdf, report, notes","Prefer the tab-separated TSV format (the documented batch convention) to avoid markdown table edge cases","Re-run node merge-tracker.mjs and confirm the file merges without the warning"],"exampleFix":"# before\n| 042 | 2026-08-20 | Acme | SRE | Interview | 4.2/5 | [042](reports/042-acme-2026-08-20.md) |\n\n# after\n| 042 | 2026-08-20 | Acme | SRE | Interview | 4.2/5 | ✅ | [042](reports/042-acme-2026-08-20.md) | note |","handlingStrategy":"validation","validationCode":"function pipeRowHasAllColumns(line) {\n  if (!line.startsWith('|')) return true; // not pipe-format\n  const parts = line.split('|').map(s => s.trim());\n  if (parts[0] === '') parts.shift();\n  if (parts[parts.length - 1] === '') parts.pop();\n  return parts.length >= 8;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate addition rows with a template or script instead of hand-typing markdown table rows","Prefer the tab-separated convention over pipe format for new additions"],"tags":["tracker","markdown-table","merge","column-count","warning"],"backgroundTag":"column-count-mismatch","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}