santifer/career-ops · warning
⚠️ config/profile.yml cv.sections lists "${shown}", but thi
Error message
⚠️ 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. What it means
generate-pdf.mjs only moves section blocks whose HTML is fully self-enclosed (balanced open/close tags within the block). If a section is present (found in the `ambiguous` map) but its markup opens or closes elements outside itself, relocating it would leave unbalanced tags, so it stays where the template put it and this warning explains why.
Source
Thrown at generate-pdf.mjs:795
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);
}
}
// It is worth one when the CV also renders titles the alias table can't name,
// because then "not in this CV" may be a misreading: the section could be
// sitting right there under a heading nothing could identify.
//
// Whether that is what happened is not knowable here — an unresolved name may
// equally be an optional section with no entries. So the report states only
// what is checkable (this name matched nothing; these titles are unidentified)
// and leaves the conclusion to the reader. Deliberately not conditioned on
// whether the document changed: a name that did nothing did nothing, whether
// or not its neighbours moved, and treating "output identical" as the failureView on GitHub (pinned to 60398d6549)
Solutions
- Restructure templates/cv-template.html so each reorderable section lives inside one balanced wrapper element
- Keep the section in its template position and remove it from cv.sections if reordering it is not essential
- Verify the fix by re-running generation and confirming the warning disappears and the output order changes as configured
Example fix
<!-- before: heading and content in different wrappers --> <div class='col'> <h2>Skills</h2> </div> <ul>...</ul> <!-- after: one balanced wrapper per section --> <div class='section' data-section='skills'> <h2>Skills</h2> <ul>...</ul> </div>
Defensive patterns
Strategy: validation
Validate before calling
// Cheap preflight on the template: every section you intend to reorder must be
// a balanced, self-enclosed block. Approximate check per candidate region:
function isBalancedRegion(html, start, end) {
const slice = html.slice(start, end);
const opens = (slice.match(/<div[\s>]/g) || []).length;
const closes = (slice.match(/<\/div>/g) || []).length;
return opens === closes;
} Prevention
- Give each reorderable section its own wrapper element in templates/cv-template.html
- Re-run PDF generation after every template edit and read the warnings before shipping
When it happens
Trigger: A custom templates/cv-template.html wraps a section heading and its content in different containers — e.g. the heading opens a <div> that a later section closes — so extractSectionBlocks() classifies the section as ambiguous instead of a movable block.
Common situations: Editing the HTML template and splitting a section across wrapper boundaries; grid/flex layouts where a section shares a wrapper with a sibling; template updates from upstream that changed the wrapping structure.
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 lists "${shown}", which i
- ⚠️ config/profile.yml cv.sections names ${names}, which mat
AI-assisted analysis of santifer/career-ops@60398d6549 (2026-08-20).
Data as JSON: /api/errors/0dfc30d02d2a8b5c.
Report an issue: GitHub.