{"record":{"id":"65a9eb9ecc5f8a78","repo":"santifer/career-ops","slug":"no-matching-evaluation-file-found-in-custommodesdir-using","errorCode":null,"errorMessage":"⚠️   No matching evaluation file found in ${customModesDir}; using default modes/oferta.md","messagePattern":"⚠️   No matching evaluation file found in (.+?); using default modes/oferta\\.md","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gemini-eval.mjs","lineNumber":122,"sourceCode":"if (existsSync(PATHS.profileYml)) {\n  try {\n    const yamlContent = stripBom(readFileSync(PATHS.profileYml, 'utf-8'));\n    const profile = yaml.load(yamlContent);\n    if (profile && profile.language && profile.language.modes_dir) {\n      const customModesDir = profile.language.modes_dir;\n      const dirPath = resolve(CODE_ROOT, customModesDir);\n      const rel = relative(CODE_ROOT, dirPath);\n      if (rel.startsWith('..') || isAbsolute(customModesDir)) {\n        console.warn(`⚠️   modes_dir \"${customModesDir}\" escapes project root; using default modes/`);\n      } else {\n        if (existsSync(dirPath)) {\n          const candidateFiles = ['oferta.md', 'angebot.md', 'offre.md', 'kyujin.md', 'is-ilani.md', 'naukri.md'];\n          const found = candidateFiles.find((file) => existsSync(join(dirPath, file)));\n          if (found) {\n            modesDir = customModesDir;\n            evalFilename = found;\n          } else {\n            console.warn(`⚠️   No matching evaluation file found in ${customModesDir}; using default modes/oferta.md`);\n          }\n        } else {\n          console.warn(`⚠️   modes_dir \"${customModesDir}\" not found; using default modes/`);\n        }\n      }\n    }\n  } catch (err) {\n    console.warn(`⚠️   Could not parse config/profile.yml: ${err.message}`);\n  }\n}\n\nPATHS.shared = join(CODE_ROOT, modesDir, '_shared.md');\nPATHS.oferta = join(CODE_ROOT, modesDir, evalFilename);\n\n// ---------------------------------------------------------------------------\n// CLI argument parsing\n// ---------------------------------------------------------------------------\nconst args = process.argv.slice(2);","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/gemini-eval.mjs#L104-L140","documentation":"When language.modes_dir in config/profile.yml points to a directory that exists and is inside the project root, gemini-eval.mjs looks for one of the known market evaluation files (oferta.md, angebot.md, offre.md, kyujin.md, is-ilani.md, naukri.md). If none exists, it warns and falls back to the default modes/oferta.md. Evaluation still runs, but with the default English evaluation mode instead of the intended market-specific one.","triggerScenarios":"modes_dir is set to a directory that contains no recognized evaluation mode file — e.g. a directory with only _shared.md, a custom modes dir holding files with non-standard names, or an empty/misnamed directory. The existsSync(join(dirPath, file)) check fails for all six candidate filenames.","commonSituations":"Users create their own market dir (e.g. modes/es) but name the file evaluacion.md instead of a recognized candidate; users point modes_dir at modes/ root where only oferta.md lives in default locations but the candidate search happens in the custom dir; partial manual setups that copied _shared.md but forgot the evaluation file.","solutions":["Add one of the recognized evaluation files to the configured directory: copy the closest market template (e.g. modes/de/angebot.md) and translate/adapt it.","Or rename your existing evaluation file to one of the candidate names (oferta.md, angebot.md, offre.md, kyujin.md, is-ilani.md, naukri.md).","Or point language.modes_dir at an existing market dir shipped with the project (modes/de, modes/fr, modes/ar, modes/ja, modes/tr, modes/hi)."],"exampleFix":"# before\nmodes/es/\n  _shared.md        # only shared file -> warning, falls back to modes/oferta.md\n\n# after\ncp modes/de/angebot.md modes/es/angebot.md   # recognized candidate -> used\n# (then translate angebot.md content to Spanish)","handlingStrategy":"validation","validationCode":"import { existsSync, readdirSync } from 'node:fs';\nimport { join } from 'node:path';\nconst CANDIDATES = ['oferta.md','angebot.md','offre.md','kyujin.md','is-ilani.md','naukri.md'];\nconst dir = resolve('modes', profile?.language?.modes_dir ?? '');\nconst hasEval = CANDIDATES.some(f => existsSync(join(dir, f)));\nif (!hasEval) console.warn(`${dir} has no evaluation file; add one of: ${CANDIDATES.join(', ')}`);","typeGuard":null,"tryCatchPattern":"try {\n  await runEvaluation();\n} catch (err) {\n  if (/No matching evaluation file/.test(err.message)) {\n    console.warn('Custom modes_dir lacks a recognized eval file; defaulting to modes/oferta.md.');\n  } else throw err;\n}","preventionTips":["When creating a custom market dir, copy a shipped market dir wholesale so the recognized eval filename is preserved.","Name your translated evaluation file with one of the recognized candidate names (oferta.md, angebot.md, offre.md, kyujin.md, is-ilani.md, naukri.md).","After adding a market dir, verify it contains both _shared.md and an evaluation file before pointing modes_dir at it.","Prefer the shipped market dirs (modes/de, modes/fr, etc.) over hand-rolled directories unless you maintain the full file set."],"tags":["config","file-not-found","modes","fallback"],"backgroundTag":"file-not-found","analyzedSha":"aac998c7ed7248ea853b720ceeb1fdbeb322fc5d","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}