Contract Evolution
Ruhroh claims are useful only when archived evidence stays readable after the tooling changes. Treat every versioned JSON file as an evidence contract, not as an implementation detail.
Use this page when building registry importers, dashboards, CI gates, leaderboards, or long-lived publication archives.
Contract Layers
Ruhroh has three kinds of versioned contract:
- scenario and suite authoring contracts, such as
ruhroh_scenario_v2andruhroh_suite_v1; - run evidence contracts, such as
ruhroh_loop_result_v1,ruhroh_run_manifest_v1,ruhroh_eval_result_v1,ruhroh_run_plan_v1, andruhroh_rerun_ledger_v1; - publication and registry contracts, such as
ruhroh_benchmark_claim_v1,ruhroh_benchmark_summary_v1,ruhroh_publish_check_v1,ruhroh_publish_bundle_v1, andruhroh_claim_index_v1.
Scenario content versions and suite versions are benchmark-methodology versions. JSON version fields are data-contract versions. Keep those concerns separate: changing a scenario prompt usually bumps metadata.scenarioVersion, while changing a JSON shape may require a new contract version.
Compatibility Rules
Compatible changes:
- adding optional fields;
- adding new warning, advisory, or remediation codes;
- adding new file roles to publication packet manifests when existing required roles are preserved;
- adding new enum values only when old consumers can safely treat unknown values as review-required;
- adding HTML views or report sections derived from already-preserved JSON.
Breaking changes:
- removing, renaming, or changing the meaning of required fields;
- changing the binary score mapping for existing evaluator statuses;
- changing sample identity semantics in run plans or run manifests;
- changing source-hash meaning for claims, packets, or registry records;
- making a previously optional field required for already-archived evidence.
When a breaking change is needed, add a new version value instead of changing the meaning of the old one. Keep validators for old versions when archived claims still need to be inspected.
Producer Rules
When Ruhroh emits evidence files:
- Include a top-level
versionfield on every machine-readable object. - Include a
$schemaURL when a structural schema is shipped. - Preserve source paths and SHA-256 hashes for evidence that supports external claims.
- Keep old raw evidence available so summaries can be recomputed when report logic improves.
- Prefer additive optional fields over shape replacement.
- Document any new required field in Result JSON Reference.
If a generated sample file changes shape, regenerate the docs samples and publication packet so reviewers can inspect the current contract in the report gallery.
Consumer Rules
When reading Ruhroh evidence:
- Branch on
versionbefore parsing a file. - Validate with the shipped schema for that version when one exists.
- Ignore unknown optional fields.
- Treat unknown statuses, judge kinds, file roles, or remediation codes as review-required instead of silently passing them.
- Use structured fields before prose fields. Do not parse human-readable warnings when structured arrays exist.
- Use
scenarioId,adapter,runId,sample.id, and run-plan samples instead of directory names for identity. - Re-hash source files with
validate-claim --verify-sourcesorpublish-check --verify-sourcesbefore trusting copied claims.
Consumers should reject malformed required fields, but they should not reject a claim only because a newer Ruhroh version added optional fields.
Migration Checklist
Before changing an emitted contract:
- Identify the affected object and current
versionvalue. - Decide whether the change is additive or breaking using the rules above.
- Update the JSON Schema and the TypeScript type together.
- Add or update validation tests for the old and new shape.
- Update
docs/result-json-reference.mdand any workflow docs that name the field. - Regenerate sample docs evidence when report, claim, packet, or registry outputs change.
- Run
validate-claim --verify-sources,validate-bundle, andclaim-indexagainst a sample publication packet when publication contracts are affected.
Do not use a migration to make old weak claims look stronger. If a new methodology gate changes publishability, preserve the old claim and publish a new claim with a new run plan, refreshed evidence, and a current publish-check report.
Archived Evidence
An archived Ruhroh publication should contain enough evidence to survive future contract changes:
- the benchmark claim and benchmark summary;
- the publication packet manifest and
publish-check.json; - the benchmark-suite manifest and task version locks;
- the run plan and optional rerun ledger;
- every referenced run result and saved evidence inventory;
- reviewer calibration, review, and reviewer-quality reports when present;
- copied source files plus hashes.
That packet lets later tooling validate the old claim as an old claim. It does not imply the claim would satisfy newer methodology, sample-size, or evaluator quality gates without rerunning publish-check under the newer toolchain.

