JCR-1 ships ten conformance vectors with three independent verifier
implementations byte-equal. The triangle primitives (conservation,
cone, oracle, elicitor) had no equivalent — implementers in other
languages had to read the Rust source to know what "compliant" means.
This commit closes that gap. Each primitive gets:
conformance/vectors.json — the canonical fixture set
conformance/README.md — the conformance contract spec
tests/conformance.rs — Rust verifier wired into cargo test
Vectors:
conservation/1 — 5 vectors: conforming, below_spec, hallucination,
missing_delta, plus a multi-finding case
cone/1 — 6 vectors: every datum_default band entry,
jouleclaw_cascade_default L0, escalate-lut-to-
formulaic, escalate-from-apex (refused)
oracle/1 — 5 vectors: always_pass, always_fail, composite
all-pass with chain dedup, composite short-
circuit on first fail, empty-composite trivial-
pass
elicitor/1 — 5 vectors: empty-walker-done, single-required-
ask, two-required-fill-first-ask-second, fully-
filled-done, optional-slot-never-asked
Each verifier asserts byte-equality between the reference impl's
serde_json output and the vector's `expected_*`. Adding a vector
extends the conformance contract for every implementer.
The Python and Go reference verifiers (the JCR-1 multi-language
pattern) are roadmap, not part of this commit — the vectors are
language-neutral so other-language verifiers can be added without
changing the contract.
4 new tests, one per primitive — all green.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
85 lines
2.2 KiB
JSON
85 lines
2.2 KiB
JSON
{
|
|
"spec": "JouleClaw Cone v1 — NoveltyBand dispatch",
|
|
"schema_id": "cone/1",
|
|
"note": "BandDispatch::entry_tier returns the first tier whose `upper` ≥ novelty. BandDispatch::escalate returns the next tier above the current one, or AtApex if there isn't one. Every implementer MUST produce the same entry_tier and escalate result for every (band, novelty) pair below, byte-equal under serde_json's serialization.",
|
|
"vector_count": 6,
|
|
"vectors": [
|
|
{
|
|
"n": 1,
|
|
"description": "Datum default band: novelty < 0.2 → lut.",
|
|
"input": {
|
|
"band": "datum_default",
|
|
"novelty": 0.05,
|
|
"complexity": 0.1
|
|
},
|
|
"expected": {
|
|
"entry_tier": "lut"
|
|
}
|
|
},
|
|
{
|
|
"n": 2,
|
|
"description": "Datum default band: 0.2 < novelty < 0.7 → formulaic.",
|
|
"input": {
|
|
"band": "datum_default",
|
|
"novelty": 0.5,
|
|
"complexity": 0.1
|
|
},
|
|
"expected": {
|
|
"entry_tier": "formulaic"
|
|
}
|
|
},
|
|
{
|
|
"n": 3,
|
|
"description": "Datum default band: novelty > 0.7 → stochastic (apex).",
|
|
"input": {
|
|
"band": "datum_default",
|
|
"novelty": 0.9,
|
|
"complexity": 0.5
|
|
},
|
|
"expected": {
|
|
"entry_tier": "stochastic"
|
|
}
|
|
},
|
|
{
|
|
"n": 4,
|
|
"description": "Datum default band: escalate lut → formulaic.",
|
|
"input": {
|
|
"band": "datum_default",
|
|
"novelty": 0.1,
|
|
"complexity": 0.1,
|
|
"escalate_from": "lut"
|
|
},
|
|
"expected": {
|
|
"entry_tier": "lut",
|
|
"escalate_to": "formulaic"
|
|
}
|
|
},
|
|
{
|
|
"n": 5,
|
|
"description": "Datum default band: escalate from apex (stochastic) is refused with AtApex.",
|
|
"input": {
|
|
"band": "datum_default",
|
|
"novelty": 0.9,
|
|
"complexity": 0.5,
|
|
"escalate_from": "stochastic"
|
|
},
|
|
"expected": {
|
|
"entry_tier": "stochastic",
|
|
"escalate_to": null,
|
|
"escalate_error": "at_apex"
|
|
}
|
|
},
|
|
{
|
|
"n": 6,
|
|
"description": "JouleClaw cascade default band: novelty < 0.05 → L0.",
|
|
"input": {
|
|
"band": "jouleclaw_cascade_default",
|
|
"novelty": 0.02,
|
|
"complexity": 0.0
|
|
},
|
|
"expected": {
|
|
"entry_tier": "L0"
|
|
}
|
|
}
|
|
]
|
|
}
|