JuliusBrussee/caveman · error · Error
is diagnosis-only but carries a change set, eval pack or…
Error message
${where} is diagnosis-only but carries a change set, eval pack or replay What it means
A case with status "diagnosis_only" is an abstention: it records a diagnosis but proposes no action. Such a case must carry no change_set.operator_id, no eval_pack id, and its replay status must remain "not_run" — otherwise the abstention would effectively be a hidden proposal. The validator throws when any of these fields is populated.
Solutions
- Set change_set.operator_id to "" and eval_pack.id to "" and replay.status to "not_run" on the diagnosis_only case.
- If the case really does propose a change, change its status away from "diagnosis_only" instead of stripping the proposal.
- Add a form/tool check that zeroes out proposal fields whenever status is set to diagnosis_only.
Example fix
// before
{ "status": "diagnosis_only", "change_set": { "operator_id": "op-42" }, "replay": { "status": "passed" } }
// after
{ "status": "diagnosis_only", "change_set": { "operator_id": "" }, "replay": { "status": "not_run" } } Defensive patterns
Strategy: validation
Validate before calling
if (item.status === 'diagnosis_only') {
if (item.change_set.operator_id !== '' || item.eval_pack.id !== '' || item.replay.status !== 'not_run') {
throw new Error('diagnosis_only case must carry no proposal');
}
} Try / catch
try { validateReport(report); } catch (err) { if (String(err.message).includes('diagnosis-only but carries')) { /* strip operator/eval/replay or change status */ } else throw err; } Prevention
- Centralize status changes in a helper that clears proposal fields when moving to diagnosis_only.
- Never pre-fill operator_id in case templates.
- Assert emptiness in the case-authoring UI before save.
When it happens
Trigger: Running the validator on a report containing a case whose status is "diagnosis_only" while change_set.operator_id is non-empty, eval_pack.id is non-empty, or replay.status is anything other than "not_run".
Common situations: Changing a case's status to diagnosis_only without clearing the previously attached operator/eval pack; template copies that pre-fill operator IDs; tooling that always emits a replay record.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- change set or eval pack is bound to another case
- apiKey, baseURL, and agent are required
- arm must be or
- artifact_id is required
- artifactId is required
AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20).
Data as JSON: /api/errors/ca2aa695b6a706c5.
Report an issue: GitHub.
Appendix: source
Thrown at packages/shared/contracts/scripts/validate-continuous-improvement.mjs:217
for (const edge of slice.unproven_adjacencies) {
// The whole point of the separate list: nothing in it may read as proven.
if (provenDependency(edge)) throw new Error(`${where} unproven adjacency ${edge.from}->${edge.to} is in fact a proven hard dependency`);
if (slice.hard_edges.some((hard) => hard.from === edge.from && hard.to === edge.to && hard.type === edge.type)) {
throw new Error(`${where} adjacency ${edge.from}->${edge.to} appears in both the hard chain and the unproven list`);
}
}
const upstream = new Set(item.diagnosis.root_cause_hypothesis.upstream_node_ids);
for (const nodeID of upstream) {
if (!slice.node_chain.includes(nodeID) || nodeID === slice.manifestation_node_id) {
throw new Error(`${where} diagnosis upstream node ${nodeID} is not an upstream node of its causal slice`);
}
}
// A case that proposes nothing must carry nothing: no operator, no eval
// pack, no replay. Anything else would present an abstention as a proposal.
if (item.status === "diagnosis_only") {
if (item.change_set.operator_id !== "" || item.eval_pack.id !== "" || item.replay.status !== "not_run") {
throw new Error(`${where} is diagnosis-only but carries a change set, eval pack or replay`);
}
continue;
}
if (item.change_set.case_id !== item.id || item.eval_pack.case_id !== item.id) {
throw new Error(`${where} change set or eval pack is bound to another case`);
}
// The case must investigate the pair its own opportunity named. A cohort
// built from a differently-derived pair would describe one comparison and
// measure another.
const source = report.opportunities.find((opportunity) => opportunity.id === item.opportunity_id);
if (!source) throw new Error(`${where} names an opportunity that is not in this report`);
if (armVariants.get("baseline").id !== source.current_variant_id || armVariants.get("alternative").id !== source.alternative_variant_id) {
throw new Error(`${where} cohort arms (${armVariants.get("baseline").id}/${armVariants.get("alternative").id}) are not the variants opportunity ${source.id} named`);
}
// Every required grader is one the recorded interpreter actually computes.
// `json_schema` is deliberately absent: over a typed interpreter result itView on GitHub (pinned to 3ee70a1026)