The durable service's documents join the version contract. A set's result (wai.quantum.set/1) and a result's provenance (wai.quantum.provenance/1) are engine schemas; the service's receipt key set (wai.quantum.receipt-keys/1, with its signed transitions) and the command line's scheduler lease (wai.quantum.lease/1) are their hosts'. The job request names programs, sweep and dry_run, a job's result may be a set's, an energy figure may be the processor packages', and a job names its store digests. A set's head now names the engine and its schema, inside what its receipt seals, as every other result does. A result's provenance names the gate set its compile wrote as basis (it read the compile summary's old target field, which the rename left empty). run_quantum_set and dry_run_quantum_job answer to output schemas, each with its verdict whether refused or not, and run_quantum_circuit asked as a dry run answers as one. The strict tests call both and hold every answer, the job's set form and the key set after a rotation to their schemas; the contract workflow requires the new tests by name, and check_schemas.py reads the new files and holds a set's run to its schema. The service's store stays at ~/.local/share/wai-quantum-service/store by default; the Python check and its tests start the service with a store in their own scratch, as the service workflow's legs already do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
164 lines
4.2 KiB
JSON
164 lines
4.2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/set.v1.json",
|
|
"title": "wai.quantum.set/1",
|
|
"description": "A set's result: many programs, or one program over a grid of its inputs, run as one job (engine::sets). Its head holds the count, how many items finished and failed, the Merkle root over the items' leaves, the set's energy and time; the set's receipt seals the set's request and its head. Each item is a plain job with its own receipt, its index, its point in a sweep, and its path to the root, so it is shown sealed by the set alone. A result names the engine that made it and this schema (engine and schema).",
|
|
"type": "object",
|
|
"required": [
|
|
"format",
|
|
"count",
|
|
"done",
|
|
"failed",
|
|
"root",
|
|
"items"
|
|
],
|
|
"properties": {
|
|
"engine": {
|
|
"type": "object",
|
|
"description": "The engine that made the result: the wai-quantum crate's name and version.",
|
|
"required": [
|
|
"name",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"const": "wai-quantum"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema": {
|
|
"const": "wai.quantum.set/1"
|
|
},
|
|
"format": {
|
|
"const": "wai.quantum.set/1"
|
|
},
|
|
"count": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"done": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"failed": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"root": {
|
|
"type": "string",
|
|
"description": "The Merkle root of the items' leaves, in hex (domains moq-jwp:merkle-leaf and moq-jwp:merkle-node, version 1)."
|
|
},
|
|
"energy": {
|
|
"$ref": "job-result.v1.json#/$defs/energy"
|
|
},
|
|
"elapsed_ms": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"receipt": {
|
|
"$ref": "receipt.v2.json"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/item"
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"item": {
|
|
"type": "object",
|
|
"description": "One item: its index, its point in a sweep, its request (a plain job, complete in itself), and its result with its own receipt, or why it failed; and its path to the set's root.",
|
|
"required": [
|
|
"index",
|
|
"request",
|
|
"status",
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"index": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"point": {
|
|
"type": "object",
|
|
"description": "A sweep's item: the value of each input it was run at."
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"done",
|
|
"failed"
|
|
]
|
|
},
|
|
"method": {
|
|
"type": "string"
|
|
},
|
|
"why": {
|
|
"type": "string"
|
|
},
|
|
"request": {
|
|
"$ref": "job-request.v1.json"
|
|
},
|
|
"result": {
|
|
"$ref": "job-result.v1.json"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"code": {
|
|
"type": "string",
|
|
"description": "A failed item's refusal code (engine::refusal)."
|
|
},
|
|
"path": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "The item's leaf's sibling digests up to the root, in hex."
|
|
}
|
|
}
|
|
},
|
|
"verify": {
|
|
"type": "object",
|
|
"description": "A set's check: the set's receipt over its request and head, the items the request gives at their indices, every item's own receipt, the root over the leaves and each item's path.",
|
|
"required": [
|
|
"valid",
|
|
"signed",
|
|
"derived",
|
|
"items",
|
|
"items_sealed",
|
|
"root"
|
|
],
|
|
"properties": {
|
|
"valid": {
|
|
"type": "boolean"
|
|
},
|
|
"signed": {
|
|
"type": "boolean"
|
|
},
|
|
"derived": {
|
|
"type": "boolean"
|
|
},
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"items_sealed": {
|
|
"type": "boolean"
|
|
},
|
|
"root": {
|
|
"type": "boolean"
|
|
},
|
|
"key": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|