| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- {
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "offline_fidelity_gate_v1_receipt.schema.json",
- "title": "Offline fidelity gate v1 receipt",
- "type": "object",
- "required": ["schema", "status", "generated_at", "toolchain", "layers", "coverage_matrix", "safety", "authority_boundary"],
- "properties": {
- "schema": { "const": "offline-fidelity-gate-v1-receipt-v1" },
- "status": { "const": "pass" },
- "generated_at": { "type": "string" },
- "toolchain": {
- "type": "object",
- "required": ["status", "toolchain", "manifest", "cleanup_policy", "safety", "authority_boundary"],
- "properties": {
- "status": { "const": "pass" },
- "toolchain": {
- "type": "object",
- "required": ["status", "tools"],
- "properties": {
- "status": { "const": "pass" },
- "tools": {
- "type": "object",
- "required": ["python", "iverilog", "vvp", "verilator", "yosys", "sby", "cocotb", "td_cli"]
- }
- },
- "additionalProperties": true
- },
- "manifest": {
- "type": "object",
- "required": ["install_roots", "tools", "cleanup_plan", "safety"],
- "properties": {
- "install_roots": { "type": "object", "minProperties": 1 },
- "tools": { "type": "array", "minItems": 8 },
- "cleanup_plan": {
- "type": "object",
- "required": ["default", "requires_owner_marker", "allowed_root"],
- "properties": {
- "default": { "const": "dry_run" },
- "requires_owner_marker": { "const": true },
- "allowed_root": { "type": "string", "minLength": 1 }
- },
- "additionalProperties": true
- }
- },
- "additionalProperties": true
- },
- "cleanup_policy": {
- "type": "object",
- "required": ["default", "requires_owner_marker", "allowed_root"],
- "properties": {
- "default": { "const": "dry_run" },
- "requires_owner_marker": { "const": true },
- "allowed_root": { "type": "string", "minLength": 1 }
- },
- "additionalProperties": true
- },
- "safety": {
- "type": "object",
- "required": ["opens_com_ports", "toggles_dtr_rts", "installs_drivers", "programs_flash", "touches_ptc_fan_bmc"],
- "properties": {
- "opens_com_ports": { "const": false },
- "toggles_dtr_rts": { "const": false },
- "installs_drivers": { "const": false },
- "programs_flash": { "const": false },
- "touches_ptc_fan_bmc": { "const": false }
- },
- "additionalProperties": true
- },
- "authority_boundary": { "type": "string" }
- },
- "additionalProperties": true
- },
- "layers": {
- "type": "object",
- "required": [
- "static",
- "model",
- "replay",
- "protocol_fuzz",
- "hdl_sim",
- "cocotb_virtual_lab",
- "virtual_driver_lab",
- "formal",
- "detector_selftest",
- "mutation",
- "thermal_digital_twin",
- "coverage_matrix",
- "td_build",
- "debug_bundle"
- ],
- "properties": {
- "static": { "$ref": "#/$defs/staticLayer" },
- "model": { "$ref": "#/$defs/modelLayer" },
- "replay": { "$ref": "#/$defs/passLayer" },
- "protocol_fuzz": { "$ref": "#/$defs/scenarioLayer" },
- "hdl_sim": { "$ref": "#/$defs/hdlLayer" },
- "cocotb_virtual_lab": { "$ref": "#/$defs/cocotbLayer" },
- "virtual_driver_lab": { "$ref": "#/$defs/virtualDriverLayer" },
- "formal": { "$ref": "#/$defs/formalLayer" },
- "detector_selftest": { "$ref": "#/$defs/detectorLayer" },
- "mutation": { "$ref": "#/$defs/mutationLayer" },
- "thermal_digital_twin": { "$ref": "#/$defs/thermalLayer" },
- "coverage_matrix": { "$ref": "#/$defs/coverageLayer" },
- "td_build": { "$ref": "#/$defs/tdLayer" },
- "debug_bundle": { "$ref": "#/$defs/debugBundleLayer" }
- },
- "additionalProperties": false,
- "$comment": "hardware, board, uart_strict, chipwatcher, thermal_performance_pass, and any undeclared layer are rejected."
- },
- "coverage_matrix": { "$ref": "#/$defs/passLayer" },
- "safety": {
- "type": "object",
- "required": ["opens_com_ports", "toggles_dtr_rts", "programs_flash", "installs_drivers", "real_ptc_fan_bmc_action_attempted"],
- "properties": {
- "opens_com_ports": { "const": false },
- "toggles_dtr_rts": { "const": false },
- "programs_flash": { "const": false },
- "installs_drivers": { "const": false },
- "real_ptc_fan_bmc_action_attempted": { "const": false }
- },
- "additionalProperties": true
- },
- "authority_boundary": {
- "type": "string",
- "not": {
- "anyOf": [
- { "pattern": "thermal_performance_pass" },
- { "pattern": "thermal performance pass" },
- { "pattern": "hardware pass" },
- { "pattern": "board pass" },
- { "pattern": "uart_strict pass" },
- { "pattern": "chipwatcher pass" }
- ]
- }
- }
- },
- "not": {
- "anyOf": [
- { "required": ["hardware"] },
- { "required": ["board"] },
- { "required": ["uart_strict"] },
- { "required": ["chipwatcher"] },
- { "required": ["thermal_performance_pass"] }
- ]
- },
- "additionalProperties": true,
- "$defs": {
- "passLayer": {
- "type": "object",
- "required": ["status"],
- "properties": { "status": { "const": "pass" } },
- "additionalProperties": true
- },
- "staticLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "returncode"]
- },
- "modelLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "tests"]
- },
- "scenarioLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "scenarios"]
- },
- "hdlLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "anyOf": [{ "required": ["tests"] }, { "required": ["backend_results"] }]
- },
- "cocotbLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "sim"]
- },
- "formalLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "targets"]
- },
- "detectorLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "results"]
- },
- "virtualDriverLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "user_mode_shims", "fault_contracts", "trace_hash"],
- "properties": {
- "user_mode_shims": {
- "type": "array",
- "minItems": 6,
- "allOf": [
- { "contains": { "type": "object", "properties": { "name": { "const": "pyserial_loopback_url" }, "status": { "const": "pass" } }, "required": ["name", "status", "transcript"] } },
- { "contains": { "type": "object", "properties": { "name": { "const": "socket_pipe_transport" }, "status": { "const": "pass" } }, "required": ["name", "status", "transcript"] } },
- { "contains": { "type": "object", "properties": { "name": { "const": "bmc_text_driver" }, "status": { "const": "pass" } }, "required": ["name", "status", "transcript"] } },
- { "contains": { "type": "object", "properties": { "name": { "const": "host_register_plane" }, "status": { "const": "pass" } }, "required": ["name", "status", "transcript"] } },
- { "contains": { "type": "object", "properties": { "name": { "const": "debug_uart_decoder" }, "status": { "const": "pass" } }, "required": ["name", "status", "transcript"] } },
- { "contains": { "type": "object", "properties": { "name": { "const": "fault_injection_facade" }, "status": { "const": "pass" } }, "required": ["name", "status", "transcript"] } }
- ]
- },
- "fault_contracts": {
- "type": "array",
- "minItems": 8,
- "allOf": [
- { "contains": { "const": "timeout" } },
- { "contains": { "const": "disconnect" } },
- { "contains": { "const": "partial_read" } },
- { "contains": { "const": "partial_write" } },
- { "contains": { "const": "permission_denied" } },
- { "contains": { "const": "buffer_overflow" } },
- { "contains": { "const": "tx_backpressure" } },
- { "contains": { "const": "rx_overflow" } }
- ]
- },
- "trace_hash": { "type": "string", "pattern": "^[0-9a-fA-F]{64}$" }
- },
- "additionalProperties": true
- },
- "mutationLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "mutants"],
- "properties": {
- "mutants": {
- "type": "array",
- "minItems": 6,
- "items": {
- "type": "object",
- "required": ["name", "status", "mutation_status", "artifact_sha256"],
- "properties": {
- "status": { "const": "pass" },
- "mutation_status": { "const": "killed" },
- "artifact_sha256": { "type": "string", "pattern": "^[0-9a-fA-F]{64}$" }
- },
- "additionalProperties": true
- }
- }
- },
- "additionalProperties": true
- },
- "thermalLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "models"],
- "properties": {
- "models": {
- "type": "array",
- "minItems": 7,
- "items": {
- "type": "object",
- "required": ["name", "status", "trace_hash"],
- "properties": {
- "status": { "const": "pass" },
- "trace_hash": { "type": "string", "pattern": "^[0-9a-fA-F]{64}$" },
- "violations": { "type": "array", "maxItems": 0 }
- },
- "additionalProperties": true
- }
- }
- },
- "additionalProperties": true
- },
- "coverageLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "items"],
- "properties": {
- "items": {
- "type": "array",
- "minItems": 12,
- "allOf": [
- { "contains": { "type": "object", "properties": { "category": { "const": "protocol" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "uart_bit" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "control" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "safety" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "debug" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "virtual_driver_lab" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "thermal" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "fault_injection" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "cocotb_virtual_lab" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "formal" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "mutation" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } },
- { "contains": { "type": "object", "properties": { "category": { "const": "td_toolchain" }, "status": { "const": "pass" } }, "required": ["category", "status", "covered_by"] } }
- ]
- }
- },
- "additionalProperties": true
- },
- "tdLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "required": ["status", "elaboration"]
- },
- "debugBundleLayer": {
- "allOf": [{ "$ref": "#/$defs/passLayer" }],
- "anyOf": [{ "required": ["path"] }, { "required": ["bundle_dir"] }]
- }
- }
- }
|