Policy and approval contracts keep deterministic authority decisions outside probabilistic model text.
Status and scope
Policy identity and version, decision scope, minimized inputs, reason codes, approvals, expiration, override rules, evidence, redaction, and review path.
Fields
| Field | Type | Required | Contract meaning |
|---|---|---|---|
contractVersion | constant | Yes | See the schema constraints and examples for this versioned field. Required value: aruntime.policy-approval.v1. |
policyId | string | Yes | See the schema constraints and examples for this versioned field. |
policyVersion | string | Yes | See the schema constraints and examples for this versioned field. |
decisionId | string | Yes | See the schema constraints and examples for this versioned field. |
scope | object | Yes | See the schema constraints and examples for this versioned field. |
inputs | object | Yes | Minimized policy input values or references. |
decision | enum | Yes | See the schema constraints and examples for this versioned field. Allowed values: allow, deny, approval-required, abstain. |
reasonCodes | array | Yes | See the schema constraints and examples for this versioned field. |
requiredApprovals | array | Yes | See the schema constraints and examples for this versioned field. |
approvalAuthority | array | Yes | See the schema constraints and examples for this versioned field. |
issuedUtc | string | Yes | UTC ISO 8601 timestamp ending in Z. |
expiresUtc | object | Yes | See the schema constraints and examples for this versioned field. |
overridePolicy | object | Yes | See the schema constraints and examples for this versioned field. |
evidence | object | Yes | See the schema constraints and examples for this versioned field. |
redaction | object | Yes | See the schema constraints and examples for this versioned field. |
reviewPath | object | Yes | See the schema constraints and examples for this versioned field. |
Versioning and compatibility rules
- Policy decisions are immutable records; policy updates create a new policy version and do not rewrite prior evidence.
- Approval is bound to the exact action, resource, amount or impact, contract versions, and expiration window.
- An abstain result is not an allow result. The runtime must fail closed or route to review according to the enclosing policy.
Validation and error behavior
Validate the complete envelope before model execution or credential resolution. Return a stable machine code, a safe human explanation, the failing JSON Pointer, and the supported contract versions. Never “repair” missing authority or risk fields with model-generated values.
{
"error": {
"code": "contract-validation-failed",
"contractVersion": "aruntime.policy-approval.v1",
"path": "/idempotencyKey",
"message": "A stable idempotency key is required.",
"retryable": false
}
}
Security, redaction, and minimization
- Approval authorities are resolved from trusted identity and role data, never from model output.
- Overrides require separately governed authority, a reason, expiration, and evidence.
- Policy inputs should use classifications, bands, references, and hashes when raw data is unnecessary.
Validated examples
Approval-required financial action
{
"contractVersion": "aruntime.policy-approval.v1",
"policyId": "refund-policy",
"policyVersion": "2026.06.1",
"decisionId": "decision:20260623:882",
"scope": {
"taskTypes": [
"customer-refund"
],
"tenantRefs": [
"tenant:demo"
],
"toolRefs": [
"refund.create.v2"
]
},
"inputs": {
"riskLevel": "high",
"amountBand": "100-500",
"actorRole": "support-agent"
},
"decision": "approval-required",
"reasonCodes": [
"financial-impact",
"threshold-exceeded"
],
"requiredApprovals": [
{
"role": "refund-approver",
"count": 1,
"separationOfDuties": true
}
],
"approvalAuthority": [
"role:refund-approver"
],
"issuedUtc": "2026-06-23T14:30:02Z",
"expiresUtc": "2026-06-23T14:45:02Z",
"overridePolicy": {
"allowed": false,
"authorityRefs": [],
"requiresReason": true
},
"evidence": {
"recordDecision": true,
"requiredFields": [
"decisionId",
"reasonCodes",
"approverRef",
"decisionUtc"
]
},
"redaction": {
"rules": [
"omit-customer-pii",
"hash-account-reference"
]
},
"reviewPath": {
"available": true,
"destination": "queue:policy-review",
"slaSeconds": 86400
}
}
Reference implementation
The bundled PHP 8.1 example validates admission fields, selects a constrained model route, checks tool permission and approval requirements, performs an idempotent synthetic operation, creates minimized evidence, handles errors, and prints expected JSON output.
Download the runnable PHP example
php examples/php/runtime_pipeline.php
