{"record":{"id":"e9d81cdfdaebc921","repo":"santifer/career-ops","slug":"config-profile-yml-cv-sections-lists-shown-e9d81c","errorCode":null,"errorMessage":"⚠️  config/profile.yml cv.sections lists \"${shown}\", which is not a CV section — ignoring it. Recognized: ${CV_SECTION_KEYS.join(', ')}.","messagePattern":"⚠️  config/profile\\.yml cv\\.sections lists \"(.+?)\", which is not a CV section — ignoring it\\. Recognized: (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"generate-pdf.mjs","lineNumber":946,"sourceCode":"  }\n\n  const chosen = [];\n  const unresolved = [];\n  const seen = new Set();\n  for (const name of order) {\n    // `name` comes from a config file and is quoted straight into console\n    // output, so it gets the same treatment as a rendered title: displayTitle()\n    // strips C0/C1 controls and bidi overrides (either can repaint a terminal\n    // line so a warning appears to say something the tool never printed) and\n    // bounds the length so one long entry cannot bury the message.\n    const shown = displayTitle(name);\n    if (seen.has(name)) {\n      console.warn(`⚠️  config/profile.yml cv.sections lists \"${shown}\" more than once — keeping its first position.`);\n      continue;\n    }\n    seen.add(name);\n    if (!CV_SECTION_KEYS.includes(name)) {\n      console.warn(`⚠️  config/profile.yml cv.sections lists \"${shown}\", which is not a CV section — ignoring it. Recognized: ${CV_SECTION_KEYS.join(', ')}.`);\n      continue;\n    }\n    const block = byKey.get(name);\n    if (block) {\n      chosen.push(block);\n    } else if (ambiguous.has(name)) {\n      // Present, but its markup doesn't stand on its own — it opens or closes\n      // elements outside itself, so moving it would leave tags unbalanced.\n      // Reported rather than skipped quietly: the section stays where the\n      // template put it, and the user would otherwise see a setting that\n      // silently does nothing.\n      console.warn(`⚠️  config/profile.yml cv.sections lists \"${shown}\", but this CV's markup does not enclose that section on its own — leaving it in place, because moving it would leave tags unbalanced.`);\n    } else {\n      // Recognized and unambiguous but with no block. Ordinarily that just means\n      // the section isn't in this CV (an optional one with no entries is\n      // stripped before the PDF step), which is not worth a warning on its own.\n      unresolved.push(name);\n    }","sourceCodeStart":928,"sourceCodeEnd":964,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/generate-pdf.mjs#L928-L964","documentation":"generate-pdf.mjs validates each cv.sections name against CV_SECTION_KEYS. A recognized section must be one of the known keys; anything else cannot be reordered and is ignored with this warning listing the valid keys so the user can correct the name.","triggerScenarios":"config/profile.yml `cv.sections` contains a name not present in CV_SECTION_KEYS (e.g. a typo like 'experiance', or a display title like 'Work Experience' instead of the key 'experience'). The check `!CV_SECTION_KEYS.includes(name)` at generate-pdf.mjs:944 fires and the name is skipped.","commonSituations":"Typo in a section key; using the human-readable heading instead of the internal key; copying section names from a different CV template that uses different keys.","solutions":["Replace the invalid name with one from the printed Recognized list (CV_SECTION_KEYS)","If the section exists in your CV under a different title, add an alias to SECTION_ALIASES in generate-pdf.mjs instead of using the raw title","Re-run PDF generation after correcting the key"],"exampleFix":"# before: config/profile.yml\ncv:\n  sections: [Work Experience, skills]\n# after\ncv:\n  sections: [experience, skills]","handlingStrategy":"validation","validationCode":"import { CV_SECTION_KEYS } from './generate-pdf.mjs';\nconst sections = profile.cv?.sections ?? [];\nconst bad = sections.filter(s => !CV_SECTION_KEYS.includes(s));\nif (bad.length) console.warn('unknown section keys:', bad, 'recognized:', CV_SECTION_KEYS);","typeGuard":"const isKnownSection = (name) => CV_SECTION_KEYS.includes(name);","tryCatchPattern":null,"preventionTips":["Use internal section keys (e.g. 'experience'), not display titles ('Work Experience')","Copy valid keys from the warning's Recognized list or CV_SECTION_KEYS","If a title is missing, extend SECTION_ALIASES rather than using the raw title in config"],"tags":["config","cv","pdf","unknown-key"],"backgroundTag":"invalid-enum-value","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"}