By the family's bar a standard ships conformance vectors a third party can reproduce — that is what makes it vendor-neutral rather than one library's behaviour. joule-ui-conformance provides shared fixtures, a deterministic vector generator, and self-verifying tests, with the pack in conformance/v1/: - C1 surface validation — exhaustive error list (valid → none; invalid → every planted fault, not first-only). - C2 interaction metering — run_interaction over a fixed-step meter reproduces the Interaction (allow, 4200 µJ HwShunt, content addresses). - C3 authorization — a zero-budget Authorizer denies before the handler runs; handler_ran=false, outputs=genesis sentinel. - C4 chain integrity — verify_chain accepts a sealed allow/allow/deny chain; excising index 1 breaks it at index 1. Fixed Ed25519 steward key (0x17*32, attests nothing) and fixed meter steps make every vector reproducible. conformance/README.md is the implementer's guide; MANIFEST.json content-addresses each vector. The suite pins the protocol + receipt, not the renderer/transport/widgets (product surfaces) — metering and capability stay recognized edges, stubbed deterministically in the vectors. 4 conformance tests; the crate is clippy-clean. Co-Authored-By: Claude Fable 5 <[email protected]>
129 lines
No EOL
2.6 KiB
JSON
129 lines
No EOL
2.6 KiB
JSON
{
|
|
"expected_invalid_errors": [
|
|
{
|
|
"kind": "missing_prop",
|
|
"path": "$.children[0]",
|
|
"prop": "min",
|
|
"widget": "Slider"
|
|
},
|
|
{
|
|
"expected": "number",
|
|
"got": "text",
|
|
"kind": "wrong_prop_type",
|
|
"path": "$.children[0]",
|
|
"prop": "max",
|
|
"widget": "Slider"
|
|
},
|
|
{
|
|
"child": "Ghost",
|
|
"kind": "disallowed_child",
|
|
"parent": "Slider",
|
|
"path": "$.children[0].children[0]"
|
|
},
|
|
{
|
|
"kind": "unknown_widget",
|
|
"name": "Ghost",
|
|
"path": "$.children[0].children[0]"
|
|
}
|
|
],
|
|
"expected_valid_errors": [],
|
|
"invalid_surface": {
|
|
"children": [
|
|
{
|
|
"children": [
|
|
{
|
|
"name": "Ghost",
|
|
"props": {}
|
|
}
|
|
],
|
|
"name": "Slider",
|
|
"props": {
|
|
"max": {
|
|
"type": "text",
|
|
"value": "ten"
|
|
},
|
|
"on_change": {
|
|
"type": "action",
|
|
"value": {
|
|
"id": "apply",
|
|
"payload": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Form",
|
|
"props": {}
|
|
},
|
|
"note": "C1 — validate(tree, registry) reproduces the EXHAUSTIVE error list.",
|
|
"registry": {
|
|
"widgets": {
|
|
"Form": {
|
|
"allow_extra_props": false,
|
|
"children": {
|
|
"kind": "any"
|
|
},
|
|
"description": "a vertical form",
|
|
"name": "Form",
|
|
"props": {}
|
|
},
|
|
"Image": {
|
|
"allow_extra_props": false,
|
|
"children": {
|
|
"kind": "none"
|
|
},
|
|
"description": "an image output",
|
|
"name": "Image",
|
|
"props": {}
|
|
},
|
|
"Slider": {
|
|
"allow_extra_props": false,
|
|
"children": {
|
|
"kind": "none"
|
|
},
|
|
"description": "a numeric slider",
|
|
"name": "Slider",
|
|
"props": {
|
|
"max": {
|
|
"required": true,
|
|
"ty": "number"
|
|
},
|
|
"min": {
|
|
"required": true,
|
|
"ty": "number"
|
|
},
|
|
"on_change": {
|
|
"required": true,
|
|
"ty": "action"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"valid_surface": {
|
|
"children": [
|
|
{
|
|
"name": "Slider",
|
|
"props": {
|
|
"max": {
|
|
"type": "number",
|
|
"value": 10.0
|
|
},
|
|
"min": {
|
|
"type": "number",
|
|
"value": 1.0
|
|
},
|
|
"on_change": {
|
|
"type": "action",
|
|
"value": {
|
|
"id": "apply",
|
|
"payload": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Form",
|
|
"props": {}
|
|
}
|
|
} |