santifer/career-ops · warning
⚠️ ${label} not found at: ${path}
Error message
⚠️ ${label} not found at: ${path} What it means
openai-eval.mjs uses the same readFile(path, label) pattern as the other evaluators: a missing context file (modes/_shared.md, modes/oferta.md, cv.md, JD capture) produces a console warning naming the path and returns '[label not found -- skipping]', and the API-based evaluation continues with an incomplete prompt rather than failing fast.
Source
Thrown at openai-eval.mjs:206
}
}
// Build the chat-completions endpoint from the base URL (which already includes
// any provider version segment, e.g. ".../v1"), matching the OpenAI SDK convention.
const endpoint = `${baseUrl}/chat/completions`;
// ---------------------------------------------------------------------------
// File helpers
// ---------------------------------------------------------------------------
/**
* Read a file and return its trimmed contents, or a placeholder if missing.
* @param {string} path - Absolute path to the file.
* @param {string} label - Human-readable label used in the warning and placeholder.
* @returns {string} File contents or a "[label not found]" placeholder.
*/
function readFile(path, label) {
if (!existsSync(path)) {
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');
const ofertaLogic = readFile(PATHS.oferta, 'modes/oferta.md');
const cvContent = readFile(PATHS.cv, 'cv.md');
const profileYml = readFile(PATHS.profileYml, 'config/profile.yml');
const languageInstruction = outputLanguageInstruction(parseOutputLanguage(profileYml));
// ---------------------------------------------------------------------------
// Build system prompt with token budget managementView on GitHub (pinned to 60398d6549)
Solutions
- Complete onboarding: node doctor.mjs --json lists exactly which of cv.md, config/profile.yml, modes/_profile.md, portals.yml are missing.
- Restore the named file from templates/ or git history (git checkout -- modes/_shared.md).
- Re-run from the repo root and confirm every 'Loading context files' line resolves without a warning before trusting scores.
Example fix
# before ⚠️ modes/oferta not found at: /repo/modes/oferta.md # after: restore the mode file, then verify no warning appears $ git checkout -- modes/oferta.md $ node openai-eval.mjs --url https://example.com/jobs/1
Defensive patterns
Strategy: validation
Validate before calling
// Pre-flight the exact paths the evaluator will read
import { existsSync } from 'node:fs';
for (const p of ['cv.md', 'config/profile.yml', 'modes/_shared.md', 'modes/oferta.md']) {
if (!existsSync(p)) console.error(`missing context: ${p}`);
} Prevention
- Complete onboarding (doctor.mjs) before the first API evaluation — API calls cost money and a degraded prompt wastes them.
- Keep customizations in the user layer so system-file updates never delete referenced modes.
- If a warning appears mid-run, abort and fix rather than trusting the score.
When it happens
Trigger: Evaluation invoked with cv.md absent (onboarding incomplete); PATHS.shared/PATHS.oferta pointing at files removed during mode customization; running from a different root so absolute paths miss; JD file argument pointing at a moved capture.
Common situations: Fresh installs; renamed or translated mode sets (modes/de etc.) without updating paths; partial git checkouts in CI; deleting a mode file while keeping config referencing it.
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/24cd54dbdd85e305.
Report an issue: GitHub.