{"record":{"id":"7f4be5bc91621cf2","repo":"santifer/career-ops","slug":"config-profile-yml-cv-sections-lists-shown","errorCode":null,"errorMessage":"⚠️  config/profile.yml cv.sections lists \"${shown}\" more than once — keeping its first position.","messagePattern":"⚠️  config/profile\\.yml cv\\.sections lists \"(.+?)\" more than once — keeping its first position\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"generate-pdf.mjs","lineNumber":778,"sourceCode":"  const { blocks, ambiguous, unrecognized } = extractSectionBlocks(html);\n\n  const byKey = new Map();\n  for (const block of blocks) {\n    if (!byKey.has(block.key)) byKey.set(block.key, block);\n  }\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 {","sourceCodeStart":760,"sourceCodeEnd":796,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/generate-pdf.mjs#L760-L796","documentation":"While resolving the configured cv.sections order, generate-pdf.mjs tracks each name in a `seen` set. A name listed more than once cannot occupy two positions, so the resolver warns and keeps only its first position (subsequent occurrences are skipped via `continue`).","triggerScenarios":"config/profile.yml cv.sections contains the same canonical key twice, e.g. [skills, education, skills] — the second 'skills' hits `seen.has(name)` and the warning fires; the effective order is [skills, education].","commonSituations":"Hand-editing the list and duplicating a line; merging two config snippets that each list a popular section like skills; YAML anchors or copy-paste producing a repeated entry.","solutions":["Dedupe cv.sections so every section appears exactly once","Re-run generation and confirm the warning is gone and the order matches intent"],"exampleFix":"# before (config/profile.yml)\ncv:\n  sections: [skills, experience, skills, education]\n\n# after\ncv:\n  sections: [skills, experience, education]","handlingStrategy":"validation","validationCode":"function hasDuplicates(order) {\n  return new Set(order).size !== order.length;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Dedupe cv.sections on save (editors with JSON/YAML sort or a preflight check make this automatic)","Remember the resolver keeps the FIRST position of a duplicate — verify intent against that behavior"],"tags":["cli","config","duplicate-entry","cv-generation","warning"],"backgroundTag":"duplicate-config-entry","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}