santifer/career-ops · warning
⚠️ config/profile.yml cv.sections lists "${shown}", which i
Error message
⚠️ config/profile.yml cv.sections lists "${shown}", which is not a CV section — ignoring it. Recognized: ${CV_SECTION_KEYS.join(', ')}. What it means
Each name in cv.sections must be one of the canonical section keys (CV_SECTION_KEYS, derived from the SECTION_ALIASES table in generate-pdf.mjs). A name not in that set is ignored with this warning, and the message lists the recognized keys so the fix is mechanical.
Source
Thrown at generate-pdf.mjs:783
}
const chosen = [];
const unresolved = [];
const seen = new Set();
for (const name of order) {
// `name` comes from a config file and is quoted straight into console
// output, so it gets the same treatment as a rendered title: displayTitle()
// strips C0/C1 controls and bidi overrides (either can repaint a terminal
// line so a warning appears to say something the tool never printed) and
// bounds the length so one long entry cannot bury the message.
const shown = displayTitle(name);
if (seen.has(name)) {
console.warn(`⚠️ config/profile.yml cv.sections lists "${shown}" more than once — keeping its first position.`);
continue;
}
seen.add(name);
if (!CV_SECTION_KEYS.includes(name)) {
console.warn(`⚠️ config/profile.yml cv.sections lists "${shown}", which is not a CV section — ignoring it. Recognized: ${CV_SECTION_KEYS.join(', ')}.`);
continue;
}
const block = byKey.get(name);
if (block) {
chosen.push(block);
} else if (ambiguous.has(name)) {
// Present, but its markup doesn't stand on its own — it opens or closes
// elements outside itself, so moving it would leave tags unbalanced.
// Reported rather than skipped quietly: the section stays where the
// template put it, and the user would otherwise see a setting that
// silently does nothing.
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.`);
} else {
// Recognized and unambiguous but with no block. Ordinarily that just means
// the section isn't in this CV (an optional one with no entries is
// stripped before the PDF step), which is not worth a warning on its own.
unresolved.push(name);
}View on GitHub (pinned to 60398d6549)
Solutions
- Replace the unrecognized name with a canonical key from the list printed in the warning itself
- Print the full accepted set with `node -e "import('./generate-pdf.mjs').then(m=>console.log(m.CV_SECTION_KEYS.join(', ')))"` and pick from it
- If the section genuinely needs a new canonical key, add an alias entry to SECTION_ALIASES in generate-pdf.mjs
Example fix
# before (config/profile.yml) cv: sections: [tech-stack, experience, education] # after cv: sections: [skills, experience, education]
Defensive patterns
Strategy: validation
Validate before calling
// Canonical keys are exported from generate-pdf.mjs (derived from SECTION_ALIASES)
// so the checker and the tool cannot drift:
import { CV_SECTION_KEYS } from './generate-pdf.mjs';
const bad = order.filter(name => !CV_SECTION_KEYS.includes(name));
if (bad.length) throw new Error(`Unknown cv.sections names: ${bad.join(', ')}`); Type guard
/** @param {string} name */
function isCanonicalSectionKey(name, keys) {
return keys.includes(name);
} Prevention
- Copy canonical keys from the warning's own 'Recognized:' list or CV_SECTION_KEYS, never from heading titles in the PDF
- After renaming sections in cv.md, grep config/profile.yml for the old names
When it happens
Trigger: Putting a display title or invented key in cv.sections — e.g. `sections: [tech-stack, experience]` where 'tech-stack' is not a canonical key — fails the CV_SECTION_KEYS.includes(name) check and is dropped from the reorder.
Common situations: User writes the human-readable heading ('Tech Stack') instead of the canonical key ('skills'); renaming a section in cv.md and assuming the config follows; typos like 'eductaion'.
Related errors
- ⚠️ ${message} (proceeding — --allow-reorder set)
- ⚠️ config/profile.yml cv.sections lists only "${displayTitl
- ⚠️ config/profile.yml cv.sections lists "${shown}" more tha
- ⚠️ config/profile.yml cv.sections names ${names}, which mat
- ⚠️ ${message} Continuing because overflow is warning-only b
AI-assisted analysis of santifer/career-ops@60398d6549 (2026-08-20).
Data as JSON: /api/errors/e9d81cdfdaebc921.
Report an issue: GitHub.