{"record":{"id":"82464d5fe323e140","repo":"santifer/career-ops","slug":"label-not-found-at-path","errorCode":null,"errorMessage":"⚠️   ${label} not found at: ${path}","messagePattern":"⚠️   (.+?) not found at: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gemini-eval.mjs","lineNumber":166,"sourceCode":"// ---------------------------------------------------------------------------\nconst apiKey = process.env.GEMINI_API_KEY;\nif (!apiKey) {\n  console.error(`\n❌  GEMINI_API_KEY not found.\n\n   1. Get a free key at https://aistudio.google.com/apikey\n   2. Add it to .env:   GEMINI_API_KEY=your_key_here\n   3. Or export it:     export GEMINI_API_KEY=your_key_here\n`);\n  process.exit(1);\n}\n\n// ---------------------------------------------------------------------------\n// File helpers\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\nfunction validateEvaluationShape(text) {\n  const issues = [];\n  const requiredBlocks = [\n    ['A', /(?:^|\\n)#{1,3}\\s*(?:A[).:-]?|Block A\\b)/im],\n    ['B', /(?:^|\\n)#{1,3}\\s*(?:B[).:-]?|Block B\\b)/im],\n    ['C', /(?:^|\\n)#{1,3}\\s*(?:C[).:-]?|Block C\\b)/im],\n    ['D', /(?:^|\\n)#{1,3}\\s*(?:D[).:-]?|Block D\\b)/im],\n    ['E', /(?:^|\\n)#{1,3}\\s*(?:E[).:-]?|Block E\\b)/im],\n    ['F', /(?:^|\\n)#{1,3}\\s*(?:F[).:-]?|Block F\\b)/im],\n    ['G', /(?:^|\\n)#{1,3}\\s*(?:G[).:-]?|Block G\\b)/im],\n  ];\n\n  for (const [label, pattern] of requiredBlocks) {","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/gemini-eval.mjs#L148-L184","documentation":"gemini-eval.mjs's readFile helper found that one of its context inputs — modes/_shared.md, modes/oferta.md, cv.md, modes/_profile.md, or config/profile.yml — does not exist at the expected path, and substituted a '[label not found — skipping]' placeholder into the prompt. The evaluation still runs, but with less grounding: a missing cv.md in particular means scores are computed without your experience, producing generic results.","triggerScenarios":"Running gemini-eval.mjs from a directory other than the repo root so the relative paths break; a fresh clone where onboarding files (cv.md, config/profile.yml) were never created; a context file renamed or moved during reorganization.","commonSituations":"Wrong working directory (the most common cause — invoking the script from outside the repo); pre-onboarding runs; reorganized repos.","solutions":["Run from the repo root: cd /path/to/career-ops && node gemini-eval.mjs ...","Create the missing files (complete onboarding: cv.md, config/profile.yml, modes/_profile.md) and re-run for grounded scores.","If a file is intentionally absent, accept the reduced-context evaluation — but treat a missing cv.md as a stop signal."],"exampleFix":"# before — relative paths break when invoked from elsewhere\n~/projects $ node career-ops/gemini-eval.mjs https://jobs.example/1\n# ⚠️   cv.md not found at: cv.md\n# after — run from the repo root so PATHS resolve\n~/projects/career-ops $ node gemini-eval.mjs https://jobs.example/1","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nconst CONTEXT_FILES = ['modes/_shared.md', 'modes/oferta.md', 'cv.md', 'modes/_profile.md', 'config/profile.yml'];\nconst missing = CONTEXT_FILES.filter((p) => !existsSync(p));\nif (missing.length) {\n  console.error(`Missing context files (run from repo root?): ${missing.join(', ')}`);\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":"if (!existsSync(path)) {\n  console.warn(`${label} not found at: ${path}`);\n  return `[${label} not found — skipping]`;\n} // graceful degradation suits OPTIONAL inputs; make cv.md a hard failure instead","preventionTips":["Always run eval scripts from the repo root so relative PATHS resolve","Complete onboarding (cv.md, config/profile.yml) before the first evaluation","Treat 'cv.md not found' as a stop signal — evaluations without the CV are noise"],"tags":["file-not-found","context","cwd","onboarding"],"backgroundTag":"missing-input-file","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}