santifer/career-ops · error · Error
invalid golden case ${f}: need string id/jd and label.{arche
Error message
invalid golden case ${f}: need string id/jd and label.{archetype:string, score:number} What it means
Error "invalid golden case ${f}: need string id/jd and label.{archetype:string, score:number}" thrown in santifer/career-ops.
Source
Thrown at eval-golden.mjs:198
// ---------------------------------------------------------------------------
// Run
// ---------------------------------------------------------------------------
if (!existsSync(goldenDir)) {
console.error(`❌ golden-set directory not found: ${goldenDir}`);
process.exit(1);
}
let cases;
try {
cases = readdirSync(goldenDir)
.filter((f) => f.endsWith('.json'))
.map((f) => {
const parsed = JSON.parse(readFileSync(join(goldenDir, f), 'utf8'));
if (typeof parsed?.id !== 'string' ||
typeof parsed?.jd !== 'string' ||
typeof parsed?.label?.archetype !== 'string' ||
typeof parsed?.label?.score !== 'number') {
throw new Error(`invalid golden case ${f}: need string id/jd and label.{archetype:string, score:number}`);
}
return parsed;
});
} catch (err) {
console.error(`❌ ${err.message || err}`);
process.exit(1);
}
if (cases.length === 0) {
console.error(`❌ no golden cases (*.json) in ${goldenDir}`);
process.exit(1);
}
console.log(`\ngolden-set eval — model "${model}" (${mode}), ${cases.length} case(s)`);
console.log(`(row ✅ needs both archetype + score; the gate counts archetype agreement only)\n`);
let archetypeHits = 0;
const deltas = [];View on GitHub (pinned to 9b17a8ac97)
Solutions
- Fix the golden case JSON: it needs a string id, a string jd, and a label with archetype (string) and score (number).
Example fix
{"id":"case1","jd":"...","label":{"archetype":"ai-product","score":4.2}} When it happens
Trigger: Thrown at eval-golden.mjs:198 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/b3a591dcfb18df35.
Report an issue: GitHub.