{"record":{"id":"b3a591dcfb18df35","repo":"santifer/career-ops","slug":"invalid-golden-case-f-need-string-id-jd-and-la","errorCode":null,"errorMessage":"invalid golden case ${f}: need string id/jd and label.{archetype:string, score:number}","messagePattern":"invalid golden case (.+?): need string id/jd and label\\.(.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"eval-golden.mjs","lineNumber":198,"sourceCode":"// ---------------------------------------------------------------------------\n// Run\n// ---------------------------------------------------------------------------\nif (!existsSync(goldenDir)) {\n  console.error(`❌  golden-set directory not found: ${goldenDir}`);\n  process.exit(1);\n}\n\nlet cases;\ntry {\n  cases = readdirSync(goldenDir)\n    .filter((f) => f.endsWith('.json'))\n    .map((f) => {\n      const parsed = JSON.parse(readFileSync(join(goldenDir, f), 'utf8'));\n      if (typeof parsed?.id !== 'string' ||\n          typeof parsed?.jd !== 'string' ||\n          typeof parsed?.label?.archetype !== 'string' ||\n          typeof parsed?.label?.score !== 'number') {\n        throw new Error(`invalid golden case ${f}: need string id/jd and label.{archetype:string, score:number}`);\n      }\n      return parsed;\n    });\n} catch (err) {\n  console.error(`❌  ${err.message || err}`);\n  process.exit(1);\n}\n\nif (cases.length === 0) {\n  console.error(`❌  no golden cases (*.json) in ${goldenDir}`);\n  process.exit(1);\n}\n\nconsole.log(`\\ngolden-set eval — model \"${model}\" (${mode}), ${cases.length} case(s)`);\nconsole.log(`(row ✅ needs both archetype + score; the gate counts archetype agreement only)\\n`);\n\nlet archetypeHits = 0;\nconst deltas = [];","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/santifer/career-ops/blob/9b17a8ac97b398a496b38e423ae24e433b43254f/eval-golden.mjs#L180-L216","documentation":"Error \"invalid golden case ${f}: need string id/jd and label.{archetype:string, score:number}\" thrown in santifer/career-ops.","triggerScenarios":"Thrown at eval-golden.mjs:198 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the golden case JSON: it needs a string id, a string jd, and a label with archetype (string) and score (number)."],"exampleFix":"{\"id\":\"case1\",\"jd\":\"...\",\"label\":{\"archetype\":\"ai-product\",\"score\":4.2}}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b17a8ac97b398a496b38e423ae24e433b43254f","analyzedAt":"2026-08-13T00:48:39.135Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}