JuliusBrussee/caveman · error · Error
no theme relationship reached the shared-analysis-unit…
Error message
no theme relationship reached the shared-analysis-unit threshold in any fixture
What it means
After validating all fixtures, this script counts theme relationships that meet the shared-analysis-unit threshold across all improvement report fixtures. If the total is zero, nothing meaningful was exercised, so the script throws rather than passing silently. This guards the continuous-improvement contract against fixtures that validate structurally but never reach the analysis threshold.
Solutions
- Inspect how relationshipCount is accumulated and the threshold constant used in the script
- Update or regenerate report fixtures so at least one theme relationship shares enough analysis units to pass the threshold
- Lower the threshold only if it genuinely over-constrains realistic fixtures
- Add at least one minimal synthetic fixture pair that provably crosses the threshold as a regression guard
Example fix
// before (fixture report)
{ "themes": ["latency"], "relationships": [] }
// after
{ "themes": ["latency", "retries"], "relationships": [{ "from": "latency", "to": "retries", "sharedAnalysisUnits": 3 }] } Defensive patterns
Strategy: validation
Validate before calling
const crossing = reports.flatMap(r => r.relationships ?? []).filter(rel => rel.sharedAnalysisUnits >= THRESHOLD);
if (crossing.length === 0) throw new Error('fixtures must include at least one relationship above threshold'); Try / catch
try { assertThresholdCoverage(reports); } catch (e) { console.error('Fixture data too weak:', e.message); process.exitCode = 1; } Prevention
- Include at least one synthetic fixture pair guaranteed to cross the threshold
- Re-check threshold constants whenever regenerating fixtures
- Assert threshold coverage in the generator's self-test
When it happens
Trigger: Running scripts/validate-continuous-improvement.mjs when the fixture reports contain no theme relationship whose shared analysis-unit count meets or exceeds the configured threshold (relationshipCount === 0).
Common situations: Fixture reports regenerated from inputs too small/degenerate to share analysis units; the threshold constant was raised without updating fixtures; relationships were removed or renamed in fixtures during a refactor.
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 workflow motif recurred across two variants of one task…
- 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/290a6dcb9fc8f858.
Report an issue: GitHub.
Appendix: source
Thrown at packages/shared/contracts/scripts/validate-continuous-improvement.mjs:338
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)