{"record":{"id":"24cd54dbdd85e305","repo":"santifer/career-ops","slug":"label-not-found-at-path-24cd54","errorCode":null,"errorMessage":"⚠️   ${label} not found at: ${path}","messagePattern":"⚠️   (.+?) not found at: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"openai-eval.mjs","lineNumber":206,"sourceCode":"  }\n}\n\n// Build the chat-completions endpoint from the base URL (which already includes\n// any provider version segment, e.g. \".../v1\"), matching the OpenAI SDK convention.\nconst endpoint = `${baseUrl}/chat/completions`;\n\n// ---------------------------------------------------------------------------\n// File helpers\n// ---------------------------------------------------------------------------\n/**\n * Read a file and return its trimmed contents, or a placeholder if missing.\n * @param {string} path - Absolute path to the file.\n * @param {string} label - Human-readable label used in the warning and placeholder.\n * @returns {string} File contents or a \"[label not found]\" placeholder.\n */\nfunction readFile(path, label) {\n  if (!existsSync(path)) {\n    console.warn(`⚠️   ${label} not found at: ${path}`);\n    return `[${label} not found — skipping]`;\n  }\n  return readFileSync(path, 'utf-8').trim();\n}\n\n// ---------------------------------------------------------------------------\n// Load context files\n// ---------------------------------------------------------------------------\nconsole.log('\\n📂  Loading context files...');\n\nconst sharedContext = readFile(PATHS.shared,     'modes/_shared.md');\nconst ofertaLogic   = readFile(PATHS.oferta,     'modes/oferta.md');\nconst cvContent     = readFile(PATHS.cv,         'cv.md');\nconst profileYml    = readFile(PATHS.profileYml, 'config/profile.yml');\nconst languageInstruction = outputLanguageInstruction(parseOutputLanguage(profileYml));\n\n// ---------------------------------------------------------------------------\n// Build system prompt with token budget management","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/openai-eval.mjs#L188-L224","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\n⚠️   modes/oferta not found at: /repo/modes/oferta.md\n# after: restore the mode file, then verify no warning appears\n$ git checkout -- modes/oferta.md\n$ node openai-eval.mjs --url https://example.com/jobs/1","handlingStrategy":"validation","validationCode":"// Pre-flight the exact paths the evaluator will read\nimport { existsSync } from 'node:fs';\nfor (const p of ['cv.md', 'config/profile.yml', 'modes/_shared.md', 'modes/oferta.md']) {\n  if (!existsSync(p)) console.error(`missing context: ${p}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["openai-eval","context-files","file-not-found","degraded-prompt"],"backgroundTag":"missing-input-file","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}