{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developer.reits.tech/schemas/runner-controller-dossier-store-dry-boot-claim-commit-dispatch-handoff.v1.schema.json",
  "title": "D05 dry-boot claim-commit dispatch handoff runtime",
  "type": "object",
  "required": ["schemaVersion","status","evaluatedAt","mode","program","summary","upstreamCommitAdmissionContract","upstreamExecutorBindingContract","dispatchHandoffContract","productionEvaluation","fenceMatrix","stepGrantMatrix","handoffProtocolMatrix","authorityMatrix","handoffGateMatrix","receiptChainMatrix","terminalReceiptFieldMatrix","lifecycleMatrix","fixtureResults","decisionCodes","invariants","safetyTruth"],
  "properties": {
    "schemaVersion": { "const": "developer.reits.tech/runner-controller-dossier-store-dry-boot-claim-commit-dispatch-handoff/v1" },
    "status": { "enum": ["ONE_TIME_DISPATCH_HANDOFF_CONTRACT_BOUND_PRODUCTION_HANDOFF_ABSENT","UPSTREAM_COMMIT_ADMISSION_CONTRACT_UNAVAILABLE","UPSTREAM_NO_SHELL_EXECUTOR_BINDING_CONTRACT_UNAVAILABLE","UPSTREAM_SOURCE_REVISION_MISMATCH"] },
    "evaluatedAt": { "type": "string", "format": "date-time" },
    "mode": { "const": "PURE_TEST_ONLY_ONE_TIME_DISPATCH_HANDOFF_NO_EXECUTOR_INVOCATION_NO_HOST_NO_PORT" },
    "program": { "$ref": "#/$defs/program" },
    "summary": { "$ref": "#/$defs/summary" },
    "upstreamCommitAdmissionContract": { "type": ["object","null"] },
    "upstreamExecutorBindingContract": { "type": ["object","null"] },
    "dispatchHandoffContract": { "type": ["object","null"] },
    "productionEvaluation": { "$ref": "#/$defs/evaluation" },
    "fenceMatrix": { "type": "array", "minItems": 3, "maxItems": 3, "items": { "type": "object" } },
    "stepGrantMatrix": { "type": "array", "minItems": 8, "maxItems": 8, "items": { "type": "object" } },
    "handoffProtocolMatrix": { "type": "array", "minItems": 6, "maxItems": 6, "items": { "type": "object" } },
    "authorityMatrix": { "type": "array", "minItems": 5, "maxItems": 5, "items": { "type": "object" } },
    "handoffGateMatrix": { "type": "array", "minItems": 18, "maxItems": 18, "items": { "type": "object" } },
    "receiptChainMatrix": { "type": "array", "minItems": 13, "maxItems": 13, "items": { "type": "object" } },
    "terminalReceiptFieldMatrix": { "type": "array", "minItems": 46, "maxItems": 46, "items": { "type": "object" } },
    "lifecycleMatrix": { "type": "array", "minItems": 13, "maxItems": 13, "items": { "type": "object" } },
    "fixtureResults": { "type": "array", "minItems": 94, "maxItems": 94, "items": { "$ref": "#/$defs/fixture" } },
    "decisionCodes": { "type": "array", "minItems": 94, "maxItems": 94, "uniqueItems": true, "items": { "type": "string" } },
    "invariants": { "type": "array", "minItems": 62, "maxItems": 62, "uniqueItems": true, "items": { "type": "string" } },
    "safetyTruth": { "$ref": "#/$defs/safetyTruth" },
    "discovery": { "type": "object" }
  },
  "$defs": {
    "program": { "type": "object", "required": ["acceptedKnives","totalKnives","currentKnife","closeoutCut","remainingIncludingCurrent","remainingAfterAcceptance","d05Accepted"], "properties": { "acceptedKnives": {"const":4}, "totalKnives":{"const":36}, "currentKnife":{"const":"D05"}, "closeoutCut":{"const":26}, "remainingIncludingCurrent":{"const":32}, "remainingAfterAcceptance":{"const":31}, "d05Accepted":{"const":false} }, "additionalProperties": false },
    "summary": { "type": "object", "required": ["fenceLayersRequired","stepGrantsRequired","protocolStagesRequired","authorityRolesRequired","handoffGates","receiptChainEntries","terminalReceiptFields","fixtureCases","fixtureAssertionsPassed","productionDispatchHandoffs","productionExecutorInvocations","productionHostsCreated","productionPort8110Calls","resourcesCreated","executionPermitted"], "properties": { "fenceLayersRequired":{"const":3}, "stepGrantsRequired":{"const":8}, "protocolStagesRequired":{"const":6}, "authorityRolesRequired":{"const":5}, "handoffGates":{"const":18}, "receiptChainEntries":{"const":13}, "terminalReceiptFields":{"const":46}, "fixtureCases":{"const":94}, "fixtureAssertionsPassed":{"const":94}, "productionDispatchHandoffs":{"const":0}, "productionExecutorInvocations":{"const":0}, "productionHostsCreated":{"const":0}, "productionPort8110Calls":{"const":0}, "resourcesCreated":{"const":0}, "executionPermitted":{"const":false} }, "additionalProperties": true },
    "evaluation": { "type": "object", "required": ["code","terminal","failedGate","fencesVerified","stepGrantsVerified","stagesVerified","authoritiesVerified","receiptsVerified","capabilityUses","productionReady"], "properties": { "code":{"type":"string"}, "terminal":{"enum":["HANDOFF_ADMITTED_FIXTURE","HANDOFF_REVOKED_FIXTURE","DENIED"]}, "failedGate":{"type":["string","null"]}, "fencesVerified":{"type":"integer"}, "stepGrantsVerified":{"type":"integer"}, "stagesVerified":{"type":"integer"}, "authoritiesVerified":{"type":"integer"}, "receiptsVerified":{"type":"integer"}, "capabilityUses":{"type":"integer"}, "productionReady":{"const":false} }, "additionalProperties": false },
    "fixture": { "type": "object", "required": ["ordinal","id","mutation","expectedCode","actualCode","expectedTerminal","terminal","passed","failedGate","fencesVerified","stepGrantsVerified","stagesVerified","authoritiesVerified","receiptsVerified","capabilityUses","productionReady"], "properties": { "ordinal":{"type":"integer"}, "id":{"type":"string","pattern":"^DBD-[0-9]{3}$"}, "mutation":{"type":"string"}, "expectedCode":{"type":"string"}, "actualCode":{"type":"string"}, "expectedTerminal":{"enum":["HANDOFF_ADMITTED_FIXTURE","HANDOFF_REVOKED_FIXTURE","DENIED"]}, "terminal":{"enum":["HANDOFF_ADMITTED_FIXTURE","HANDOFF_REVOKED_FIXTURE","DENIED"]}, "passed":{"type":"boolean"}, "failedGate":{"type":["string","null"]}, "fencesVerified":{"type":"integer"}, "stepGrantsVerified":{"type":"integer"}, "stagesVerified":{"type":"integer"}, "authoritiesVerified":{"type":"integer"}, "receiptsVerified":{"type":"integer"}, "capabilityUses":{"type":"integer"}, "productionReady":{"const":false} }, "additionalProperties": false },
    "safetyTruth": { "type": "object", "required": ["productionDispatchHandoffs","productionDispatches","productionExecutorInvocations","productionHostsCreated","productionHostContacts","productionPort8110Calls","durableReadsExecuted","durableWritesExecuted","externalReadsExecuted","externalWritesExecuted","resourcesCreated","d1Created","r2Created","productionDispatchDriverConfigured","controller8110Started","executionPermitted"], "properties": { "productionDispatchHandoffs":{"const":0}, "productionDispatches":{"const":0}, "productionExecutorInvocations":{"const":0}, "productionHostsCreated":{"const":0}, "productionHostContacts":{"const":0}, "productionPort8110Calls":{"const":0}, "durableReadsExecuted":{"const":0}, "durableWritesExecuted":{"const":0}, "externalReadsExecuted":{"const":0}, "externalWritesExecuted":{"const":0}, "resourcesCreated":{"const":0}, "d1Created":{"const":0}, "r2Created":{"const":0}, "productionDispatchDriverConfigured":{"const":false}, "controller8110Started":{"const":false}, "executionPermitted":{"const":false} }, "additionalProperties": true }
  },
  "additionalProperties": true
}
