open-standards/wai/wai-quantum-cli/schemas/lease.v1.json
Transaction Science a4dee88425 wai-quantum contract over the durable service: sets, provenance, dry runs, the receipt key set and the lease, each with its schema
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]>
2026-10-28 08:42:53 -04:00

48 lines
1.5 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-cli/schemas/lease.v1.json",
"title": "wai.quantum.lease/1",
"description": "The lease wai-quantum task keeps for a batch scheduler's job (by default wai-quantum-lease.json in its working directory): the job service it reaches, when the lease was acquired, the service's receipt key and limits as it described them then, and every task started under it, so that release stops what is still queued or running.",
"type": "object",
"required": [
"format",
"service",
"acquired_ms",
"tasks"
],
"properties": {
"format": {
"const": "wai.quantum.lease/1"
},
"service": {
"type": "string",
"description": "The job service's address."
},
"acquired_ms": {
"type": "integer",
"minimum": 0,
"description": "When the lease was acquired, in milliseconds since 1970."
},
"receipt_key": {
"type": [
"string",
"null"
],
"description": "The service's current receipt key when the lease was acquired, in hex."
},
"limits": {
"type": [
"object",
"null"
],
"description": "The service's limits as it described them (GET /v1)."
},
"tasks": {
"type": "array",
"items": {
"type": "string"
},
"description": "The id of every task started under the lease, in order."
}
}
}