santifer/career-ops · warning
⚠️ ${label} not found at: ${path}
Error message
⚠️ ${label} not found at: ${path} What it means
openai-tailor.mjs's readFile takes a `required` flag: required files (process exits 1 with ❌) versus optional context files, where absence only warns and yields '[label not found -- skipping]'. This warning is the optional path -- e.g. voice/writing guardrail files like voice-dna.md -- so tailoring runs but without those style constraints.
Source
Thrown at openai-tailor.mjs:174
❌ No API key for ${endpointHost}.
Set one and re-run: OPENAI_API_KEY=your_key node openai-tailor.mjs ...
`);
process.exit(1);
}
}
const endpoint = `${baseUrl}/chat/completions`;
// ---------------------------------------------------------------------------
// File helpers
// ---------------------------------------------------------------------------
function readFile(path, label, required = false) {
if (!existsSync(path)) {
if (required) {
console.error(`❌ Required context file not found: ${label} at ${path}`);
process.exit(1);
}
console.warn(`⚠️ ${label} not found at: ${path}`);
return `[${label} not found — skipping]`;
}
return readFileSync(path, 'utf-8').trim();
}
// ---------------------------------------------------------------------------
// Load context files
// ---------------------------------------------------------------------------
console.log('\\n📂 Loading context files...');
const sharedContext = readFile(PATHS.shared, 'modes/_shared.md', false);
// Writing guardrails (Voice DNA / Writing Style / Professional Writing) live in
// _writing.md since #1710 — a CV-tailoring script needs them, unlike the eval
// engines that read the eval-core _shared.md alone.
const writingContext = readFile(PATHS.writing, 'modes/_writing.md', false);
const pdfModeLogic = readFile(PATHS.pdfMode, 'modes/pdf.md', false);
const cvContent = readFile(PATHS.cv, 'cv.md', true);
const profileContent = readFile(PATHS.profile, 'config/profile.yml', true);View on GitHub (pinned to 60398d6549)
Solutions
- Decide whether the missing file matters for output quality; if yes, create it (e.g. voice-dna.md) at the path shown in the warning.
- If intentionally absent, ignore the warning -- output is still generated, just unstyled by that file.
- Pass required=true in code paths where tailoring without the file is worse than failing.
Example fix
// before: optional guardrail silently absent from the prompt const voice = readFile(PATHS.voice, 'voice-dna'); // after: fail fast when voice shaping is required for this run const voice = readFile(PATHS.voice, 'voice-dna', /* required */ true);
Defensive patterns
Strategy: validation
Validate before calling
// Distinguish optional from load-bearing context before tailoring
import { existsSync } from 'node:fs';
const optionalButLoadBearing = ['voice-dna.md'];
for (const p of optionalButLoadBearing) {
if (!existsSync(p)) console.warn(`${p} absent — output will ship without voice constraints`);
} Prevention
- Create voice-dna.md and modes/_profile.md during onboarding so tailoring always has style guardrails.
- For CI or scripted tailoring, pass required=true for files whose absence would invalidate the output.
- Treat this warning as a quality signal for user-facing documents, not a runtime fault.
When it happens
Trigger: Optional style/guardrail files (voice-dna.md, modes/_profile.md extras) not created by the user; running the tailor step before personalization files exist; paths customized to files later deleted.
Common situations: Skipping optional personalization steps during setup; deleting voice-dna.md after deciding not to use it; CI running the tailor on a minimal checkout.
Related errors
- ⚠️ ${label} not found at: ${path}
- ⚠️ ${label} not found at: ${path}
- Profile photo not found or unreadable: ${photo} (${err.code
- Template not found for kind=${kind} name=${chosen} (${fileFo
- missing replay fixture: ${fixture} — record it or run --live
AI-assisted analysis of santifer/career-ops@60398d6549 (2026-08-20).
Data as JSON: /api/errors/a64058eefa199f17.
Report an issue: GitHub.