{ "$comment": "Structural schema; also run versioned model validation for cross-field budgets, result consistency, UUID canonical form and UTF-8 byte limits.", "$defs": { "LeaseBinding": { "additionalProperties": false, "properties": { "attempt_id": { "format": "uuid", "title": "Attempt Id", "type": "string" }, "evaluation_id": { "format": "uuid", "title": "Evaluation Id", "type": "string" }, "fencing_version": { "maximum": 9223372036854775807, "minimum": 1, "title": "Fencing Version", "type": "integer" }, "worker_id": { "format": "uuid", "title": "Worker Id", "type": "string" } }, "required": [ "evaluation_id", "attempt_id", "worker_id", "fencing_version" ], "title": "LeaseBinding", "type": "object" } }, "$id": "urn:kf-oj:judge-lease:v1", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "properties": { "attempt_number": { "maximum": 5, "minimum": 1, "title": "Attempt Number", "type": "integer" }, "binding": { "$ref": "#/$defs/LeaseBinding" }, "expires_at_unix_ms": { "maximum": 9223372036854775807, "minimum": 1, "title": "Expires At Unix Ms", "type": "integer" }, "kind": { "const": "judge.lease", "title": "Kind", "type": "string" }, "lease_token": { "maxLength": 64, "minLength": 64, "pattern": "^[0-9a-f]{64}$", "title": "Lease Token", "type": "string" }, "manifest_digest": { "maxLength": 64, "minLength": 64, "pattern": "^[0-9a-f]{64}$", "title": "Manifest Digest", "type": "string" }, "schema_version": { "const": 1, "title": "Schema Version", "type": "integer" } }, "required": [ "schema_version", "kind", "binding", "lease_token", "attempt_number", "expires_at_unix_ms", "manifest_digest" ], "title": "LeaseGrant", "type": "object" }