{"record":{"id":"9b3f9328f2396074","repo":"santifer/career-ops","slug":"missing-replay-fixture-fixture-record-it-or","errorCode":null,"errorMessage":"missing replay fixture: ${fixture} — record it or run --live","messagePattern":"missing replay fixture: (.+?) — record it or run --live","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"eval-golden.mjs","lineNumber":145,"sourceCode":"\n/**\n * Return the candidate model's raw evaluation text for one golden case.\n *\n * In replay mode this reads a recorded fixture so the gate is offline and\n * deterministic; in live mode it shells out to openai-eval.mjs, reusing the\n * real prompt-assembly path rather than duplicating it here.\n *\n * @param {{id: string, jd: string}} testCase - The golden case being run.\n * @returns {string} Raw model output (expected to contain a SCORE_SUMMARY block).\n */\nfunction getCompletion(testCase) {\n  if (mode === 'replay') {\n    // Slash-form provider ids (e.g. \"deepseek/deepseek-chat\") must not become\n    // path separators, or the fixture lands in a phantom subdirectory. Sanitize\n    // to a flat filename — record fixtures under the same sanitized name.\n    const fixture = join(fixtureDir, `${testCase.id}__${fixtureModelId(model)}.txt`);\n    if (!existsSync(fixture)) {\n      throw new Error(`missing replay fixture: ${fixture} — record it or run --live`);\n    }\n    return readFileSync(fixture, 'utf8');\n  }\n\n  // live: write the JD to a temp file and run the existing evaluator.\n  const dir = mkdtempSync(join(tmpdir(), 'eval-golden-'));\n  try {\n    const jdFile = join(dir, 'jd.txt');\n    writeFileSync(jdFile, testCase.jd);\n    const res = spawnSync(process.execPath,\n      [join(ROOT, 'openai-eval.mjs'), '--file', jdFile, '--model', model, '--no-save'],\n      { encoding: 'utf8', env: process.env, timeout: 360000 });\n    if (res.status !== 0) {\n      throw new Error(`openai-eval.mjs exited ${res.status}: ${(res.stderr || '').slice(0, 200)}`);\n    }\n    return res.stdout || '';\n  } finally {\n    rmSync(dir, { recursive: true, force: true });","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/santifer/career-ops/blob/9b17a8ac97b398a496b38e423ae24e433b43254f/eval-golden.mjs#L127-L163","documentation":"Error \"missing replay fixture: ${fixture} — record it or run --live\" thrown in santifer/career-ops.","triggerScenarios":"Thrown at eval-golden.mjs:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Record the missing fixture by running eval-golden.mjs in record mode.","Or run with --live to evaluate against the live model instead of the replay fixture."],"exampleFix":"node eval-golden.mjs --live","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"}