santifer/career-ops · warning
⚠️ Unrecognized _shared.md section "${sectionName}" → defau
Error message
⚠️ Unrecognized _shared.md section "${sectionName}" → defaulting to P${DEFAULT_PRIORITY} (compressible). Update SECTION_PRIORITY in lib/context-budget.mjs if this section is evaluation-critical. What it means
getPriority in lib/context-budget.mjs maps _shared.md section names to compression priorities via a hardcoded SECTION_PRIORITY table. When it meets a section name not in the table, it warns once per key and falls back to DEFAULT_PRIORITY, meaning the section is treated as compressible (low priority) and may be dropped or shrunk in context-budgeted output. The warning is a maintenance signal: the table needs updating or evaluation-critical content may be silently compressed.
Source
Thrown at lib/context-budget.mjs:152
/**
* Look up the priority of a section by its header name.
*
* Emits a warning when a section falls through to DEFAULT_PRIORITY so drift
* between _shared.md headings and SECTION_PRIORITY is observable.
*
* @param {string} sectionName - The section header text (e.g., "Scoring System").
* @returns {number} 0 (P0), 1 (P1), or 2 (P2 / default).
*/
function getPriority(sectionName) {
const key = sectionName.toLowerCase()
// Strip parenthetical suffixes like "(Block G)" or "(writing guardrail)"
.replace(/\s*\([^)]*\)\s*/g, ' ')
.replace(/\s+/g, ' ')
.trim();
if (!(key in SECTION_PRIORITY) && !_warnedSections.has(key)) {
_warnedSections.add(key);
console.warn(`⚠️ Unrecognized _shared.md section "${sectionName}" → defaulting to P${DEFAULT_PRIORITY} (compressible). Update SECTION_PRIORITY in lib/context-budget.mjs if this section is evaluation-critical.`);
}
return SECTION_PRIORITY[key] ?? DEFAULT_PRIORITY;
}
// ---------------------------------------------------------------------------
// Compression
// ---------------------------------------------------------------------------
/**
* Compress _shared.md content by removing lower-priority sections.
*
* Sections are identified by `## Section Name` headers and removed in
* priority order (P2 first, then P1) until the target token reduction
* is met or no more removable sections remain.
*
* P0 sections (scoring, archetypes, legitimacy, global rules) are never removed.
*
* @param {string} sharedContent - Raw _shared.md content.View on GitHub (pinned to 1696bec4d0)
Solutions
- Open lib/context-budget.mjs and add the new section name to SECTION_PRIORITY with an appropriate priority (high/non-compressible if evaluation-critical)
- Check whether modes/_shared.md was hand-edited or renamed; revert the heading name or register the new name
- Update career-ops system files (node update-system.mjs apply) if the warning appeared after a partial update left lib/ and modes/ out of sync
- Verify the behavior you want: if defaulting to P (compressible) is actually fine for that section, the warning can be ignored, but prefer explicit registration
Example fix
// before (lib/context-budget.mjs)
const SECTION_PRIORITY = { 'Evaluation Blocks': 1, 'Risk Summary': 2 };
// _shared.md gained a 'Machine Summary' section → warning
// after
const SECTION_PRIORITY = { 'Evaluation Blocks': 1, 'Risk Summary': 2, 'Machine Summary': 3 }; Defensive patterns
Strategy: validation
Validate before calling
// Before running budget-sensitive pipelines, check every _shared.md section is registered:
import { SECTION_PRIORITY } from './lib/context-budget.mjs';
const sections = parseSectionNames(readFileSync('modes/_shared.md', 'utf-8'));
const unregistered = sections.filter(s => !(normalizeKey(s) in SECTION_PRIORITY));
if (unregistered.length) console.warn('Register in SECTION_PRIORITY:', unregistered); Prevention
- Add a test asserting every _shared.md heading exists in SECTION_PRIORITY
- Keep modes/_shared.md and lib/context-budget.mjs updated together (system layer updates in lockstep)
- Strip parenthetical suffixes the same way getPriority does when adding keys
- On seeing the warning, decide the priority explicitly instead of accepting the compressible default
When it happens
Trigger: Adding or renaming a section heading in modes/_shared.md (or any file routed through getPriority) without adding the matching key to SECTION_PRIORITY in lib/context-budget.mjs; parenthetical suffixes are stripped, so only the base name matters. Repeats for the same section are suppressed via _warnedSections.
Common situations: A career-ops update introduces new _shared.md sections while the local lib/context-budget.mjs is older; a user hand-edits _shared.md adding custom sections; a typo in a heading ('Evalution') that no longer matches any key.
Related errors
- ${LOCAL_PATHS_FILE}: refusing "${path}" — ${why}
- ⚠️ Font file not found, keeping original reference: fonts/$
- [fetch] Playwright error: ${e.message} — falling back to pla
- Playwright extraction failed or blocked, trying fallback Web
- outcome-types.mjs: "${key}" is accepted by outcome.mjs but h
AI-assisted analysis of santifer/career-ops@1696bec4d0 (2026-09-01).
Data as JSON: /api/errors/59ced9ad5fc33ca4.
Report an issue: GitHub.