{"record":{"id":"4394fe4d6a3c6598","repo":"JuliusBrussee/caveman","slug":"where-requires-grader-grader-which-the-reco","errorCode":null,"errorMessage":"${where} requires grader ${grader}, which the recorded interpreter does not compute","messagePattern":"(.+?) requires grader (.+?), which the recorded interpreter does not compute","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/shared/contracts/scripts/validate-continuous-improvement.mjs","lineNumber":240,"sourceCode":"      throw new Error(`${where} change set or eval pack is bound to another case`);\n    }\n\n    // The case must investigate the pair its own opportunity named. A cohort\n    // built from a differently-derived pair would describe one comparison and\n    // measure another.\n    const source = report.opportunities.find((opportunity) => opportunity.id === item.opportunity_id);\n    if (!source) throw new Error(`${where} names an opportunity that is not in this report`);\n    if (armVariants.get(\"baseline\").id !== source.current_variant_id || armVariants.get(\"alternative\").id !== source.alternative_variant_id) {\n      throw new Error(`${where} cohort arms (${armVariants.get(\"baseline\").id}/${armVariants.get(\"alternative\").id}) are not the variants opportunity ${source.id} named`);\n    }\n\n    // Every required grader is one the recorded interpreter actually computes.\n    // `json_schema` is deliberately absent: over a typed interpreter result it\n    // could only assert that a hash is non-empty, which is a grader that cannot\n    // fail and therefore inflates how much a replay was checked.\n    const knownGraders = new Set([\"exact_match\", \"tool_order\", \"tool_count\", \"guard_respected\"]);\n    for (const grader of item.eval_pack.graders) {\n      if (!knownGraders.has(grader)) throw new Error(`${where} requires grader ${grader}, which the recorded interpreter does not compute`);\n    }\n\n    // Every dataset case — recorded or generated — must name a real analysis\n    // unit of this case's own task family, and its generator and perturbation\n    // must agree. A generated case whose source unit cannot be resolved would be\n    // invented evidence wearing an adversarial label.\n    const dataset = item.eval_pack.dataset;\n    const generatorPerturbation = new Map([\n      [\"recorded_case.v1\", \"none\"],\n      [\"boundary_guard_threshold.v1\", \"guard_threshold_boundary\"],\n      [\"adversarial_misleading_tool_output.v1\", \"misleading_tool_output\"],\n      [\"adversarial_stale_input.v1\", \"stale_input\"],\n    ]);\n    const roleCounts = { target_failure: 0, prior_success: 0, boundary: 0, adversarial: 0 };\n    const recordedSources = new Set();\n    const datasetCaseIDs = new Set();\n    for (const entry of dataset.cases) {\n      const at = `${where} dataset case ${entry.id}`;","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/3ee70a102609e550bd2e68004bf5990a9341c851/packages/shared/contracts/scripts/validate-continuous-improvement.mjs#L222-L258","documentation":"Replay eval packs may only require graders the recorded interpreter is known to compute: exact_match, tool_order, tool_count, and guard_respected. json_schema is deliberately excluded because over a typed interpreter result it could only check a non-empty hash — a grader that cannot fail and would inflate the apparent rigor of a replay. Any other grader name triggers this error.","triggerScenarios":"Running the validator on a report whose eval_pack.graders array contains a grader string outside the fixed allowlist (e.g. \"json_schema\", \"llm_judge\", or a misspelled grader name).","commonSituations":"Adding json_schema out of habit from other eval frameworks; typos like \"exact-match\" vs \"exact_match\"; copying graders from a different tool's eval config.","solutions":["Replace the unsupported grader with one from the allowlist: exact_match, tool_order, tool_count, or guard_respected.","Remove json_schema (and any unverifiable grader) from the graders list entirely.","Fix spelling/casing so the grader name exactly matches an allowlisted identifier."],"exampleFix":"// before\n\"graders\": [\"exact_match\", \"json_schema\"]\n// after\n\"graders\": [\"exact_match\", \"tool_order\"]","handlingStrategy":"validation","validationCode":"const knownGraders = new Set(['exact_match', 'tool_order', 'tool_count', 'guard_respected']);\nfor (const g of item.eval_pack.graders) {\n  if (!knownGraders.has(g)) throw new Error(`grader ${g} not computed by recorded interpreter`);\n}","typeGuard":"const isKnownGrader = (g) => ['exact_match','tool_order','tool_count','guard_respected'].includes(g);","tryCatchPattern":"try { validateReport(report); } catch (err) { if (String(err.message).includes('which the recorded interpreter does not compute')) { /* fix graders list against allowlist */ } else throw err; }","preventionTips":["Keep the grader allowlist in a shared constant imported by the eval-pack editor.","Exclude json_schema by policy for typed interpreter results.","Validate grader names at eval-pack authoring time."],"tags":["validation","graders","allowlist"],"backgroundTag":"invalid-enum-value","analyzedSha":"3ee70a102609e550bd2e68004bf5990a9341c851","analyzedAt":"2026-09-20T15:53:39.229Z","contentChangedAt":"2026-09-20T15:53:39.229Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}