{"record":{"id":"3198ea5ffc3f7cd4","repo":"JuliusBrussee/caveman","slug":"no-workflow-motif-recurred-across-two-variants-of","errorCode":null,"errorMessage":"no workflow motif recurred across two variants of one task family in any fixture","messagePattern":"no workflow motif recurred across two variants of one task family in any fixture","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/shared/contracts/scripts/validate-continuous-improvement.mjs","lineNumber":339,"sourceCode":"    }\n    for (const proof of item.replay.trial_proofs) {\n      if (!datasetCaseIDs.has(proof.dataset_case_id)) throw new Error(`${where} replay trial ${proof.id} replays a case outside the composed dataset`);\n      for (const arm of [proof.baseline, proof.candidate]) {\n        const graders = arm.grader_results.map((grader) => grader.grader).sort();\n        const required = [...item.eval_pack.graders].sort();\n        if (graders.join(\",\") !== required.join(\",\")) {\n          throw new Error(`${where} replay trial ${proof.id} graded ${graders.join(\",\")}, want exactly ${required.join(\",\")}`);\n        }\n      }\n    }\n  }\n}\nif (!Array.isArray(spans) || spans.length === 0) throw new Error(\"canonical span fixture is empty\");\nfor (const [index, span] of spans.entries()) {\n  if (!validateSpan(span)) throw new Error(`canonical span ${index}: ${ajv.errorsText(validateSpan.errors)}`);\n}\nif (relationshipCount === 0) throw new Error(\"no theme relationship reached the shared-analysis-unit threshold in any fixture\");\nif (motifCount === 0) throw new Error(\"no workflow motif recurred across two variants of one task family in any fixture\");\nconsole.log(`validated ${reports.length} generated improvement report(s), ${relationshipCount} theme relationship(s), ${motifCount} workflow motif(s) and ${spans.length} canonical spans`);\n","sourceCodeStart":321,"sourceCodeEnd":341,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/packages/shared/contracts/scripts/validate-continuous-improvement.mjs#L321-L341","documentation":"Fires after scanning all report fixtures: motifCount is zero — no workflow motif was observed recurring across two variants of the same task family in any fixture. The validator requires at least one recurring motif as evidence the motif detector finds cross-variant patterns; zero means the fixtures or the detector produce no recurring workflow motif at all.","triggerScenarios":"Thrown at packages/shared/contracts/scripts/validate-continuous-improvement.mjs:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add or regenerate a fixture pair — two variants of one task family whose flows share a recurring workflow motif.","Check the motif extraction/dedup logic for a bug that prevents any motif from counting as recurring.","Confirm fixture flows are similar enough to yield a shared motif before re-running the validator."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}