{"record":{"id":"040c530e9182432e","repo":"santifer/career-ops","slug":"application-answers-section-has-skipped-length","errorCode":null,"errorMessage":"Application Answers section has ${skipped.length} unreadable ${skipped.length === 1 ? 'entry' : 'entries'}: ${skipped.join(' | ')}","messagePattern":"Application Answers section has (.+?) unreadable (.+?): (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"application-answers.mjs","lineNumber":311,"sourceCode":"    afterHeading,\n    nextHeading ? afterHeading + nextHeading.index : report.length,\n  );\n\n  const dateHit = /^\\*\\*Date:\\*\\*\\s*(.*)$/m.exec(body);\n  const stateHit = /^\\*\\*State:\\*\\*\\s*(.*)$/m.exec(body);\n  const groups = sliceGroups(body);\n\n  const snapshot = {\n    date: dateHit ? dateHit[1].trim() : '',\n    state: stateHit ? stateHit[1].trim().toLowerCase() : '',\n    freeText: parseQaEntries(groups.freeText, 'question', 'answer', onSkip),\n    selections: parseCompactEntries(groups.selections, 'question', 'selection', onSkip),\n    fieldValues: parseCompactEntries(groups.fieldValues, 'question', 'answer', onSkip),\n    files: parseFileEntries(groups.files, onSkip),\n  };\n\n  if (strict && skipped.length) {\n    throw new Error(\n      `Application Answers section has ${skipped.length} unreadable ` +\n      `${skipped.length === 1 ? 'entry' : 'entries'}: ${skipped.join(' | ')}`,\n    );\n  }\n  return snapshot;\n}\n\n/**\n * Read the evaluation mode's `## H) Draft Application Answers` block.\n *\n * A DIFFERENT producer and a different format from the section above.\n * `parseApplicationAnswersSection` reads a format this module also writes, so\n * the two halves are pinned to each other. Nothing writes Block H from code:\n * `modes/oferta.md:622` specifies its heading and nothing about its body, so\n * the bold-question-then-paragraph shape below is a CONVENTION the evaluation\n * happens to emit, not a contract. This reads the convention and degrades to an\n * empty list when it does not hold, rather than guessing: a mispaired\n * question/answer here would be re-submitted to an employer later.","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/application-answers.mjs#L293-L329","documentation":"When parsing the Application Answers section with strict mode enabled, entries that fail parsing are collected into skipped (via the onSkip callback) instead of aborting immediately. If any entries were skipped, the parser throws listing each unreadable entry joined by ' | ' so the user can fix them one by one. In non-strict mode the skips are tolerated and the snapshot is returned anyway.","triggerScenarios":"Running the parser/CLI with --strict (parseApplicationAnswersSection's strict flag) over an Application Answers section containing malformed compact entries (missing question/answer separators), malformed file entries, or entries with unexpected formatting/encoding.","commonSituations":"Hand-edited answers file with inconsistent markdown formatting; output from another tool that writes slightly different field labels; copy-paste that dropped a delimiter; CLI flag --strict left on from a validation run while parsing a file known to have legacy entries.","solutions":["Fix or remove each listed unreadable entry in the Application Answers section (the error lists them pipe-separated).","Re-run without --strict if you accept partial parsing and want skips ignored rather than fatal.","Regenerate the section via the tool's own write path so entries use the canonical compact format the parser expects."],"exampleFix":"// before\nnode application-answers.mjs --read --strict\n// after\nnode application-answers.mjs --read  # tolerate skips; inspect snapshot, then fix entries and re-run with --strict","handlingStrategy":"try-catch","validationCode":"// dry-run parse first without strict to see what would be skipped\nconst snap = parseApplicationAnswersSection(text, { strict: false });\nif (snap.skipped?.length) console.warn('Entries needing fixes:', snap.skipped);","typeGuard":null,"tryCatchPattern":"try {\n  const snapshot = parseApplicationAnswersSection(text, { strict: true });\n} catch (err) {\n  const m = err.message.match(/unreadable (\\d+) entr\\w+: (.+)/s);\n  if (m) {\n    const bad = m[2].split(' | ');\n    console.error('Fix these entries:', bad);\n    process.exitCode = 1;\n    return;\n  }\n  throw err;\n}","preventionTips":["Run non-strict first to inventory problem entries, fix them, then enforce strict.","Avoid hand-editing the Application Answers section; regenerate entries through the tool's write path.","Keep entries in the canonical compact format (question/answer/selection separators intact) when editing manually."],"tags":["parsing","validation","cli"],"backgroundTag":"invalid-argument-format","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"}