JuliusBrussee/caveman · error · Error
no workflow motif recurred across two variants of one task…
Error message
no workflow motif recurred across two variants of one task family in any fixture
What it means
The script requires that at least one workflow motif recurs across two variants of the same task family in the fixture set. If motifCount is zero, the fixtures never demonstrate motif recurrence, which is a core behavior this contract is supposed to cover, so the script throws. This prevents vacuously-passing validation.
Solutions
- Check the motif extraction/matching logic in the script to see how motifCount is computed
- Regenerate fixtures from two variants of the same task family so a motif recurs in both
- Align motif identifiers/shapes between generator output and the script's matcher if a rename broke matching
- Add an explicit motif fixture pair that documents the expected recurrence
Example fix
// before (two variants, no shared motif)
variantA: { "taskFamily": "deploy", "steps": ["build"] }
variantB: { "taskFamily": "release", "steps": ["tag"] }
// after
variantA: { "taskFamily": "deploy", "steps": ["build", "test", "deploy"], "motifs": ["build-test"] }
variantB: { "taskFamily": "deploy", "steps": ["build", "test", "deploy-canary"], "motifs": ["build-test"] } Defensive patterns
Strategy: validation
Validate before calling
const families = new Map();
for (const f of fixtures) families.set(f.taskFamily, [...(families.get(f.taskFamily) ?? []), f]);
const recurring = [...families.values()].some(vs => new Set(vs.flatMap(v => v.motifs ?? [])).size && vs.length >= 2);
if (!recurring) throw new Error('no recurring motif across task-family variants'); Try / catch
try { assertMotifRecurrence(fixtures); } catch (e) { console.error('Motif coverage missing:', e.message); process.exitCode = 1; } Prevention
- Always add fixtures as variant pairs of one task family
- Keep motif ids stable across generator versions
- Add a motif-recurrence smoke check to the fixture generator
When it happens
Trigger: Running scripts/validate-continuous-improvement.mjs when no fixture pair of task-family variants shares a recurring workflow motif (motifCount === 0).
Common situations: Fixtures regenerated from unrelated task families; motif detection output changed shape (e.g. motif ids renamed) so matching fails; fixture variants were edited independently and lost their shared motif.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- canonical span
- expected exactly 2 agent conformance fixtures, found
- ${fixtureFiles[index]}…
- no theme relationship reached the shared-analysis-unit…
- report fixture : theme inherited a registry id that is not…
AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20).
Data as JSON: /api/errors/3198ea5ffc3f7cd4.
Report an issue: GitHub.
Appendix: source
Thrown at packages/shared/contracts/scripts/validate-continuous-improvement.mjs:339
}
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)