santifer/career-ops · warning
⚠️ Skipping malformed TSV
Error message
⚠️ Skipping malformed TSV ${filename}: ${parts.length} fields What it means
The legacy headerless tab-separated path requires at least 8 fields (num, date, company, role, score, status, pdf, report). A TSV row with fewer than 8 tab-separated cells is malformed — merging it would leave later fields undefined or shifted — so the file is skipped with this warning instead.
Solutions
- Complete the row to at least 8 tab-separated fields in the documented order: num\tdate\tcompany\trole\tscore\tstatus\tpdf\treport (then notes and any via=/location/url extras).
- Make sure the delimiters are real tab characters, not spaces or commas — re-save with actual tabs or use the headed form to avoid positional issues.
- If the row should end with an empty optional cell, keep the trailing tab; don't let an editor trim it.
- Prefer writing the headed TSV (header labels + one data row) so merge-tracker resolves every field by name.
- Re-run node merge-tracker.mjs after fixing and confirm the row merges.
Example fix
// before (6 fields, comma-delimited) 42,2026-09-16,Acme,Backend Engineer,4.2/5,Evaluated // after (tab-separated, 9 fields) 42 2026-09-16 Acme Backend Engineer 4.2/5 Evaluated ❌ [042](reports/042-acme-2026-09-16.md) good fit
Defensive patterns
Strategy: validation
Validate before calling
const cells = row.split('\t');
if (cells.length < 8) {
throw new Error(`${file}: TSV row needs >= 8 tab-separated fields, got ${cells.length}`);
} Prevention
- Build rows with an array join('\t') over a fixed 8+ element array so the width is structural, not hand-typed.
- Confirm the delimiter is a real tab character (printf '\t'), not a space or comma — and never save the file as CSV.
- Preserve trailing tabs for empty optional cells; disable editor 'strip trailing whitespace' for these files.
- Prefer the headed TSV form so field resolution doesn't depend on position or width.
When it happens
Trigger: parseTsvContent (merge-tracker.mjs:976-979): content does not start with '|' and is not recognized as a header row, so content.split('\t') yields parts.length < 8. E.g. a row with only the first 6-7 positional cells, often from a missing trailing tab or a truncated write.
Common situations: A script built the row with join('\t') over a short array; the final tab of a row ending in an empty optional cell was stripped by a text editor or trimming (the parser splits raw content precisely to avoid this, but a genuinely short row still fails); a CSV was mis-saved as TSV so the whole row is one tab-less cell; a writer used commas instead of tabs.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- ⚠️ Skipping : a URL sits under " " while the "url" cell is…
- ⚠️ Skipping : cannot tell score from status in columns 5–6…
- ⚠️ Skipping : data row has field(s), missing the required…
- ⚠️ Skipping : data rows — one addition per file
- ⚠️ Skipping : header row with no data row
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/ba34e3cf4b22fadd.
Report an issue: GitHub.
Appendix: source
Thrown at merge-tracker.mjs:978
date: parts[1],
company: parts[2],
role: parts[3],
// Write-canonical: the tracker stores scores unbolded (verify-pipeline
// rejects bold scores), so strip any markdown bold from the incoming cell.
score: resolved.score.replace(/\*\*/g, '').trim(),
status: validateStatus(resolved.status),
pdf: parts[6],
report: parts[7],
notes: parts[8] || '',
};
const extras = parseTsvExtras(parts, filename);
if (!extras) return null;
Object.assign(addition, extras);
} else {
// Tab-separated
parts = content.split('\t');
if (parts.length < 8) {
console.warn(`⚠️ Skipping malformed TSV ${filename}: ${parts.length} fields`);
return null;
}
// Column order varies: batch TSVs write (status, score), applications.md is
// (score, status). Identify each by content — the score cell is recognizable
// by pattern, a status never is — so a reordered TSV merges correctly and an
// undecidable row is skipped loudly instead of merging swapped data (#1427).
const resolved = resolveScoreStatus(parts[4].trim(), parts[5].trim());
if (!resolved) {
console.warn(`⚠️ Skipping ${filename}: cannot tell score from status in columns 5–6 ("${parts[4].trim()}" | "${parts[5].trim()}") — refusing to merge a possible column swap`);
return null;
}
addition = {
num: parseTrackerNum(parts[0]),
date: parts[1],
company: parts[2],
role: parts[3],View on GitHub (pinned to aac998c7ed)