{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developer.reits.tech/schemas/runner-factory-controller-disposable-host-live-evidence-collection-quote-budget-claim-transaction-plan.v1.schema.json",
  "title": "Runner Factory Quote Budget Claim Transaction Plan",
  "type": "object",
  "required": [
    "schemaVersion",
    "status",
    "observedAt",
    "scope",
    "upstream",
    "operations",
    "planSteps",
    "authorityTopology",
    "transactionGuardrails",
    "stateModel",
    "invariants",
    "productionPrerequisites",
    "selectedDenialTrace",
    "verification",
    "truth",
    "fixtureRegistry",
    "discovery"
  ],
  "properties": {
    "schemaVersion": {
      "const": "developer.reits.tech/runner-factory-disposable-host-live-evidence-collection-quote-budget-claim-transaction-plan-contract/v1"
    },
    "status": {
      "const": "DISPOSABLE_HOST_LIVE_EVIDENCE_COLLECTION_QUOTE_BUDGET_CLAIM_TRANSACTION_PLAN_IMPLEMENTED_NOT_CONFIGURED"
    },
    "observedAt": {
      "type": "string",
      "format": "date-time"
    },
    "scope": {
      "type": "object",
      "required": [
        "mode",
        "input",
        "output",
        "verdict",
        "fixturePlanStepsVerified",
        "realIdentityVerified",
        "realUserConfirmed",
        "liveQuoteRead",
        "budgetHoldCreated",
        "hostClaimCreated",
        "hostContacted",
        "packageLoaded",
        "processSpawned",
        "shellSurface",
        "transactionAuthority",
        "launchAuthority",
        "billingAuthority",
        "promotionAuthority",
        "productionEntrypointWired"
      ],
      "properties": {
        "mode": {
          "const": "FIXTURE_QUOTE_BUDGET_CLAIM_PLAN_ONLY_NO_PROVIDER_READ_NO_DURABLE_WRITE_NO_HOST_CLAIM"
        },
        "input": {
          "const": "POSITIVELY_VERIFIED_FIXTURE_DETACHED_USER_CONFIRMATION_RECEIPT"
        },
        "output": {
          "const": "QUOTE_BUDGET_CLAIM_TRANSACTION_PLAN_PREPARED_FIXTURE_ONLY"
        },
        "verdict": {
          "const": "REQUIRES_REAL_CONFIRMATION_LIVE_QUOTE_DURABLE_HOLD_CLAIM_COMMIT_AND_EXECUTION_AUTHORIZATION"
        },
        "fixturePlanStepsVerified": {
          "const": 5
        },
        "realIdentityVerified": {
          "const": false
        },
        "realUserConfirmed": {
          "const": false
        },
        "liveQuoteRead": {
          "const": false
        },
        "budgetHoldCreated": {
          "const": false
        },
        "hostClaimCreated": {
          "const": false
        },
        "hostContacted": {
          "const": false
        },
        "packageLoaded": {
          "const": false
        },
        "processSpawned": {
          "const": false
        },
        "shellSurface": {
          "const": "NONE"
        },
        "transactionAuthority": {
          "const": "NONE"
        },
        "launchAuthority": {
          "const": "NONE"
        },
        "billingAuthority": {
          "const": "NONE"
        },
        "promotionAuthority": {
          "const": "NONE"
        },
        "productionEntrypointWired": {
          "const": false
        }
      },
      "additionalProperties": false
    },
    "upstream": {
      "type": "object",
      "required": [
        "schemaVersion",
        "status",
        "verdict",
        "authoritativeVerificationRequired",
        "positiveBooleanRequired"
      ],
      "properties": {
        "schemaVersion": {
          "const": "developer.reits.tech/runner-factory-disposable-host-live-evidence-collection-detached-user-confirmation-receipt/v1"
        },
        "status": {
          "const": "DETACHED_USER_CONFIRMATION_VERIFIED_FIXTURE_ONLY"
        },
        "verdict": {
          "const": "REQUIRES_FRESH_QUOTE_BUDGET_HOLD_HOST_CLAIM_AND_EXECUTION_AUTHORIZATION"
        },
        "authoritativeVerificationRequired": {
          "const": true
        },
        "positiveBooleanRequired": {
          "const": true
        }
      },
      "additionalProperties": false
    },
    "operations": {
      "type": "array",
      "minItems": 4,
      "maxItems": 4,
      "items": {
        "type": "object",
        "required": [
          "id",
          "input",
          "output",
          "sideEffect"
        ],
        "properties": {
          "id": {
            "enum": [
              "prepare",
              "project",
              "verify",
              "dispose"
            ]
          },
          "input": {
            "type": "string",
            "minLength": 1
          },
          "output": {
            "type": "string",
            "minLength": 1
          },
          "sideEffect": {
            "const": "NONE"
          }
        },
        "additionalProperties": false
      }
    },
    "planSteps": {
      "type": "array",
      "minItems": 5,
      "maxItems": 5,
      "items": {
        "type": "object",
        "required": [
          "ordinal",
          "step",
          "authority",
          "signerKeyId",
          "effect",
          "observedLive"
        ],
        "properties": {
          "ordinal": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "step": {
            "enum": [
              "FRESH_PRICE_QUOTE_READ_PLAN",
              "QUOTE_FRESHNESS_REVALIDATION_PLAN",
              "CONDITIONAL_BUDGET_HOLD_PLAN",
              "IDEMPOTENT_HOST_CLAIM_PLAN",
              "HOLD_AND_CLAIM_COMPENSATION_PLAN"
            ]
          },
          "authority": {
            "enum": [
              "PRICING_AUTHORITY",
              "COST_POLICY_OWNER",
              "BUDGET_AUTHORITY",
              "CAPACITY_AUTHORITY",
              "RESERVATION_SAFETY_OWNER"
            ]
          },
          "signerKeyId": {
            "pattern": "^fixture-p256-[a-z-]+$"
          },
          "effect": {
            "type": "string",
            "minLength": 1
          },
          "observedLive": {
            "const": false
          }
        },
        "additionalProperties": false
      }
    },
    "authorityTopology": {
      "type": "array",
      "minItems": 5,
      "maxItems": 5,
      "items": {
        "type": "object",
        "required": [
          "authority",
          "steps",
          "mayReadProvider",
          "mayReserveBudget",
          "mayClaimHost",
          "mayExecute"
        ],
        "properties": {
          "authority": {
            "type": "string",
            "minLength": 1
          },
          "steps": {
            "const": 1
          },
          "mayReadProvider": {
            "const": false
          },
          "mayReserveBudget": {
            "const": false
          },
          "mayClaimHost": {
            "const": false
          },
          "mayExecute": {
            "const": false
          }
        },
        "additionalProperties": false
      }
    },
    "transactionGuardrails": {
      "type": "object",
      "required": [
        "requestValiditySeconds",
        "planShapeValiditySeconds",
        "hostCountMaximum",
        "maximumMilliUsdCeiling",
        "currency",
        "quoteMaxAgeSeconds",
        "holdTtlSeconds",
        "claimTtlSeconds",
        "collectionWindowSeconds",
        "retirementSlaSeconds",
        "atomicOrdering",
        "failurePolicy",
        "environment",
        "networkIngress",
        "networkEgress",
        "shellSurface",
        "realIdentityVerified",
        "realUserConfirmed",
        "liveQuoteRead",
        "budgetHoldCreated",
        "hostClaimCreated",
        "productionConfigured"
      ],
      "properties": {
        "requestValiditySeconds": {
          "const": 30
        },
        "planShapeValiditySeconds": {
          "const": 3600
        },
        "hostCountMaximum": {
          "const": 1
        },
        "maximumMilliUsdCeiling": {
          "const": 500
        },
        "currency": {
          "const": "USD"
        },
        "quoteMaxAgeSeconds": {
          "const": 300
        },
        "holdTtlSeconds": {
          "const": 900
        },
        "claimTtlSeconds": {
          "const": 900
        },
        "collectionWindowSeconds": {
          "const": 600
        },
        "retirementSlaSeconds": {
          "const": 120
        },
        "atomicOrdering": {
          "const": "QUOTE_THEN_HOLD_THEN_CLAIM"
        },
        "failurePolicy": {
          "const": "RELEASE_HOLD_AND_CLAIM_OR_CONTAIN"
        },
        "environment": {
          "const": "isolated-nonproduction-required-not-provisioned"
        },
        "networkIngress": {
          "const": "NONE"
        },
        "networkEgress": {
          "const": "DEFAULT_DENY_ALLOWLIST_REQUIRED"
        },
        "shellSurface": {
          "const": "NONE"
        },
        "realIdentityVerified": {
          "const": false
        },
        "realUserConfirmed": {
          "const": false
        },
        "liveQuoteRead": {
          "const": false
        },
        "budgetHoldCreated": {
          "const": false
        },
        "hostClaimCreated": {
          "const": false
        },
        "productionConfigured": {
          "const": false
        }
      },
      "additionalProperties": false
    },
    "stateModel": {
      "type": "array",
      "minItems": 15,
      "maxItems": 15,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "invariants": {
      "type": "array",
      "minItems": 78,
      "maxItems": 78,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "productionPrerequisites": {
      "type": "array",
      "minItems": 16,
      "maxItems": 16,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "selectedDenialTrace": {
      "type": "object",
      "required": [
        "fixtureId",
        "mutation",
        "expected",
        "reason"
      ],
      "properties": {
        "fixtureId": {
          "const": "RFDHLEQBCP-55"
        },
        "mutation": {
          "const": "SCOPE_BUDGET_HOLD_CREATED"
        },
        "expected": {
          "const": "DENY"
        },
        "reason": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "verification": {
      "type": "object",
      "required": [
        "status",
        "fixtures",
        "acceptedOutcomes",
        "deniedOutcomes",
        "upstreamReceiptsVerified",
        "planStepReceiptsVerified",
        "planReceiptsVerified",
        "projectedPlans",
        "disposedHandles",
        "realIdentityVerificationsObserved",
        "realUserConfirmationsObserved",
        "livePriceQuotesObserved",
        "durableBudgetHoldsObserved",
        "durableClaimReservationsObserved",
        "productionHostRuns",
        "pricingReadsExecuted",
        "externalReadsExecuted",
        "externalWritesExecuted",
        "mutationsExecuted",
        "paidResourcesCreated"
      ],
      "properties": {
        "status": {
          "const": "PASS_FIXTURE_ONLY"
        },
        "fixtures": {
          "const": 104
        },
        "acceptedOutcomes": {
          "const": 14
        },
        "deniedOutcomes": {
          "const": 90
        },
        "upstreamReceiptsVerified": {
          "const": 81
        },
        "planStepReceiptsVerified": {
          "const": 172
        },
        "planReceiptsVerified": {
          "const": 3
        },
        "projectedPlans": {
          "const": 17
        },
        "disposedHandles": {
          "const": 2
        },
        "realIdentityVerificationsObserved": {
          "const": 0
        },
        "realUserConfirmationsObserved": {
          "const": 0
        },
        "livePriceQuotesObserved": {
          "const": 0
        },
        "durableBudgetHoldsObserved": {
          "const": 0
        },
        "durableClaimReservationsObserved": {
          "const": 0
        },
        "productionHostRuns": {
          "const": 0
        },
        "pricingReadsExecuted": {
          "const": 0
        },
        "externalReadsExecuted": {
          "const": 0
        },
        "externalWritesExecuted": {
          "const": 0
        },
        "mutationsExecuted": {
          "const": 0
        },
        "paidResourcesCreated": {
          "const": false
        }
      },
      "additionalProperties": false
    },
    "truth": {
      "type": "object",
      "required": [
        "realIdentityVerificationsObserved",
        "realUserConfirmationsObserved",
        "livePriceQuotesObserved",
        "durableBudgetHoldsObserved",
        "durableClaimReservationsObserved",
        "productionDriversObserved",
        "watchdogArmingsObserved",
        "networkLeasesObserved",
        "imageAttestationsObserved",
        "retirementDrillsObserved",
        "incidentWindowsObserved",
        "policyRevalidationsObserved",
        "productionHostRuns",
        "productionHostClaims",
        "processesSpawned",
        "hostContacts",
        "packageLoads",
        "pricingReadsExecuted",
        "systemdUnitsInstalled",
        "controllerServicesStarted",
        "controllerListeners",
        "listenerStarts",
        "publicRoutes",
        "reverseProxyRoutes",
        "externalReadsExecuted",
        "externalWritesExecuted",
        "mutationsExecuted",
        "paidResourcesCreated",
        "deploymentPermitted"
      ],
      "properties": {
        "realIdentityVerificationsObserved": {
          "const": 0
        },
        "realUserConfirmationsObserved": {
          "const": 0
        },
        "livePriceQuotesObserved": {
          "const": 0
        },
        "durableBudgetHoldsObserved": {
          "const": 0
        },
        "durableClaimReservationsObserved": {
          "const": 0
        },
        "productionDriversObserved": {
          "const": 0
        },
        "watchdogArmingsObserved": {
          "const": 0
        },
        "networkLeasesObserved": {
          "const": 0
        },
        "imageAttestationsObserved": {
          "const": 0
        },
        "retirementDrillsObserved": {
          "const": 0
        },
        "incidentWindowsObserved": {
          "const": 0
        },
        "policyRevalidationsObserved": {
          "const": 0
        },
        "productionHostRuns": {
          "const": 0
        },
        "productionHostClaims": {
          "const": 0
        },
        "processesSpawned": {
          "const": 0
        },
        "hostContacts": {
          "const": 0
        },
        "packageLoads": {
          "const": 0
        },
        "pricingReadsExecuted": {
          "const": 0
        },
        "systemdUnitsInstalled": {
          "const": 0
        },
        "controllerServicesStarted": {
          "const": 0
        },
        "controllerListeners": {
          "const": 0
        },
        "listenerStarts": {
          "const": 0
        },
        "publicRoutes": {
          "const": 0
        },
        "reverseProxyRoutes": {
          "const": 0
        },
        "externalReadsExecuted": {
          "const": 0
        },
        "externalWritesExecuted": {
          "const": 0
        },
        "mutationsExecuted": {
          "const": 0
        },
        "paidResourcesCreated": {
          "const": false
        },
        "deploymentPermitted": {
          "const": false
        }
      },
      "additionalProperties": false
    },
    "fixtureRegistry": {
      "type": "object",
      "required": [
        "schemaVersion",
        "description",
        "networkRequestsExecuted",
        "pricingReadsExecuted",
        "realIdentityVerificationsExecuted",
        "userConfirmationsExecuted",
        "budgetHoldsExecuted",
        "hostClaimsExecuted",
        "hostLaunchesExecuted",
        "externalWritesExecuted",
        "paidResourcesCreated",
        "cases"
      ],
      "properties": {
        "schemaVersion": {
          "const": "developer.reits.tech/runner-factory-disposable-host-live-evidence-collection-quote-budget-claim-transaction-plan-fixtures/v1"
        },
        "description": {
          "type": "string",
          "minLength": 1
        },
        "networkRequestsExecuted": {
          "const": 0
        },
        "pricingReadsExecuted": {
          "const": 0
        },
        "realIdentityVerificationsExecuted": {
          "const": 0
        },
        "userConfirmationsExecuted": {
          "const": 0
        },
        "budgetHoldsExecuted": {
          "const": 0
        },
        "hostClaimsExecuted": {
          "const": 0
        },
        "hostLaunchesExecuted": {
          "const": 0
        },
        "externalWritesExecuted": {
          "const": 0
        },
        "paidResourcesCreated": {
          "const": false
        },
        "cases": {
          "type": "array",
          "minItems": 104,
          "maxItems": 104,
          "items": {
            "type": "object",
            "required": [
              "id",
              "expected",
              "mutation"
            ],
            "properties": {
              "id": {
                "pattern": "^RFDHLEQBCP-(?:0[1-9]|[1-9][0-9]|10[0-4])$"
              },
              "expected": {
                "enum": [
                  "ACCEPT",
                  "DENY"
                ]
              },
              "mutation": {
                "type": "string",
                "minLength": 1
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "discovery": {
      "type": "object",
      "required": [
        "controller",
        "lifecycle",
        "upstream",
        "workbench",
        "schema"
      ],
      "properties": {
        "controller": {
          "const": "/api/runner-factory/controller"
        },
        "lifecycle": {
          "const": "/api/runner-factory"
        },
        "upstream": {
          "const": "/api/runner-factory/controller/disposable-host-live-evidence-collection-detached-user-confirmation"
        },
        "workbench": {
          "const": "/release-foundation#disposable-host-live-evidence-collection-quote-budget-claim-transaction-plan"
        },
        "schema": {
          "const": "/schemas/runner-factory-controller-disposable-host-live-evidence-collection-quote-budget-claim-transaction-plan.v1.schema.json"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
