JuliusBrussee/caveman · error · Error
replay trial graded , want exactly
Error message
${where} replay trial ${proof.id} graded ${graders.join(",")}, want exactly ${required.join(",")} What it means
Each arm (baseline and candidate) of every replay trial must have grader_results covering exactly the graders declared in item.eval_pack.graders — no missing graders, no extras. The validator compares the sorted grader-name lists and throws on any difference, ensuring replay evidence is complete and not padded with irrelevant graders.
Solutions
- Re-run the replay trials so each arm records results for exactly the current eval_pack.graders.
- Remove stale grader_results entries whose grader is no longer in the eval pack.
- Add the missing grader run for arms that lack it (or drop the grader from eval_pack.graders if it is no longer wanted).
- Check for duplicate grader entries in one arm's results.
Example fix
// before: graders ["exact_match"] but eval pack requires ["exact_match","guard_respected"] // after: re-run replay so the arm includes both grader results, // or align the pack: item.eval_pack.graders = ["exact_match"];
Defensive patterns
Strategy: validation
Validate before calling
const required = [...item.eval_pack.graders].sort().join(",");
for (const proof of item.replay.trial_proofs) {
for (const arm of [proof.baseline, proof.candidate]) {
const got = arm.grader_results.map((g) => g.grader).sort().join(",");
if (got !== required) throw new Error(`grader coverage mismatch: ${got} != ${required}`);
}
} Prevention
- Re-run replays after any change to eval_pack.graders.
- Fail the replay run if any grader execution errors instead of omitting results.
- Prune stale grader results when removing a grader from the pack.
When it happens
Trigger: validate-continuous-improvement.mjs sorts arm.grader_results grader names and compares to sorted item.eval_pack.graders; any missing, extra, or duplicated grader entry triggers the throw.
Common situations: Adding a grader to the eval pack without re-running replays; a grader run failing silently so its result is absent; leaving an obsolete grader's results in old proof files after removing it from the pack.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- replay trial replays a case outside the composed dataset
- canonical span fixture is empty
- boundary case list disagrees with the composed dataset
- cohort arm references a workflow variant that is not in…
- cohort arm uses a variant of another task family
AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20).
Data as JSON: /api/errors/ad0eb33074f9158d.
Report an issue: GitHub.
Appendix: source
Thrown at packages/shared/contracts/scripts/validate-continuous-improvement.mjs:328
if (composed !== dataset.cases.length) throw new Error(`${where} dataset roles (${composed}) do not account for its ${dataset.cases.length} cases`);
if (dataset.replay_case_ids.length !== datasetCaseIDs.size) throw new Error(`${where} replay manifest carries ${dataset.replay_case_ids.length} ids for ${datasetCaseIDs.size} dataset cases`);
for (const datasetCaseID of dataset.replay_case_ids) {
if (!datasetCaseIDs.has(datasetCaseID)) throw new Error(`${where} replay manifest case ${datasetCaseID} is not a composed dataset case`);
}
// The guard grader exists exactly when there is a perturbed case to catch a
// candidate on; a required grader with no case behind it is decoration.
const perturbed = dataset.cases.some((entry) => entry.perturbation !== "none");
if (perturbed !== item.eval_pack.graders.includes("guard_respected")) {
throw new Error(`${where} guard_respected grader ${perturbed ? "missing for" : "declared without"} perturbed dataset cases`);
}
for (const proof of item.replay.trial_proofs) {
if (!datasetCaseIDs.has(proof.dataset_case_id)) throw new Error(`${where} replay trial ${proof.id} replays a case outside the composed dataset`);
for (const arm of [proof.baseline, proof.candidate]) {
const graders = arm.grader_results.map((grader) => grader.grader).sort();
const required = [...item.eval_pack.graders].sort();
if (graders.join(",") !== required.join(",")) {
throw new Error(`${where} replay trial ${proof.id} graded ${graders.join(",")}, want exactly ${required.join(",")}`);
}
}
}
}
}
if (!Array.isArray(spans) || spans.length === 0) throw new Error("canonical span fixture is empty");
for (const [index, span] of spans.entries()) {
if (!validateSpan(span)) throw new Error(`canonical span ${index}: ${ajv.errorsText(validateSpan.errors)}`);
}
if (relationshipCount === 0) throw new Error("no theme relationship reached the shared-analysis-unit threshold in any fixture");
if (motifCount === 0) throw new Error("no workflow motif recurred across two variants of one task family in any fixture");
console.log(`validated ${reports.length} generated improvement report(s), ${relationshipCount} theme relationship(s), ${motifCount} workflow motif(s) and ${spans.length} canonical spans`);
View on GitHub (pinned to 3ee70a1026)