{"record":{"id":"0b7b730df0050f58","repo":"santifer/career-ops","slug":"label-not-found-path","errorCode":null,"errorMessage":"  ⚠️  ${label} not found: ${path}","messagePattern":"  ⚠️  (.+?) not found: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/golden-budget-analysis.mjs","lineNumber":36,"sourceCode":"import { readFileSync, readdirSync, existsSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\nimport { buildBudgetedPrompt, SECTION_PRIORITY } from './context-budget.mjs';\n\nconst ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');\nconst GOLDEN_DIR = join(ROOT, 'evals', 'golden');\n\nif (!existsSync(GOLDEN_DIR)) {\n  console.error('Golden directory not found:', GOLDEN_DIR);\n  process.exit(1);\n}\n\n// ---------------------------------------------------------------------------\n// Load context files\n// ---------------------------------------------------------------------------\nfunction readFile(path, label) {\n  if (!existsSync(path)) {\n    console.warn(`  ⚠️  ${label} not found: ${path}`);\n    return `[${label} not found]`;\n  }\n  return readFileSync(path, 'utf-8').trim();\n}\n\nconst sharedContent = readFile(join(ROOT, 'modes', '_shared.md'), '_shared.md');\nconst ofertaContent = readFile(join(ROOT, 'modes', 'oferta.md'), 'oferta.md');\n\nconst p0Keys = Object.entries(SECTION_PRIORITY)\n  .filter(([, p]) => p === 0)\n  .map(([k]) => k);\n\n// ---------------------------------------------------------------------------\n// Synthetic CVs — a real cv.md is 500-3000 lines of markdown.\n// ---------------------------------------------------------------------------\nconst CV_BLURB = [\n  '',\n  '### Head of AI — TechCorp (2022-Present)',","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/santifer/career-ops/blob/60398d6549a46f5266929538af21cfab94badc75/lib/golden-budget-analysis.mjs#L18-L54","documentation":"lib/golden-budget-analysis.mjs loads modes/_shared.md and modes/oferta.md to measure how the context-budget compressor would treat them. Its readFile() helper warns when a path is missing and substitutes the placeholder string `[<label> not found]`, so the analysis continues but its numbers describe placeholder text, not the real mode files.","triggerScenarios":"Running the analysis from a directory where join(ROOT, 'modes', '_shared.md') or oferta.md does not exist — e.g. the modes/ dir was renamed, files were deleted, or ROOT resolution points somewhere unexpected — existsSync(path) returns false and the warning plus placeholder substitution fire.","commonSituations":"Running the script from a checkout missing the modes/ directory; a language market-mode layout (modes/de/...) without the English files; moved or renamed mode files during refactoring.","solutions":["Restore modes/_shared.md and modes/oferta.md at the repository root the script expects","Run the script from the repository root so ROOT-relative paths resolve","If you intentionally use a market mode set, point the script's file paths at modes/<market>/_shared.md or copy the files into place"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nfunction requireContextFiles(root) {\n  const missing = ['modes/_shared.md', 'modes/oferta.md']\n    .filter(rel => !existsSync(join(root, rel)));\n  if (missing.length) throw new Error(`Missing context files: ${missing.join(', ')}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run repo-root analysis scripts from the repository root","If using a market mode set, verify the English modes/ files exist or repoint the script before running"],"tags":["missing-file","analysis-tooling","filesystem","warning"],"backgroundTag":"missing-input-file","analyzedSha":"60398d6549a46f5266929538af21cfab94badc75","analyzedAt":"2026-08-20T23:00:06.764Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}