Search ARuntime.com

Find runtime definitions and implementation guidance

Search page titles, summaries, headings, glossary terms, use cases, and runtime-directory entries.

Enter at least two characters.

Developers

Policy and Approval Contract

Versioned policy decisions, reason codes, approval authority, expiration, override rules, evidence, redaction, and review paths.

Audience: Security engineers; governance leaders; runtime developers Reading time: 3 minutes Status: Production guidance Last reviewed:

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.

Download JSON SchemaOpen examples

Fields

Policy and Approval Decision v1
FieldTypeRequiredContract meaning
contractVersionconstantYesSee the schema constraints and examples for this versioned field. Required value: aruntime.policy-approval.v1.
policyIdstringYesSee the schema constraints and examples for this versioned field.
policyVersionstringYesSee the schema constraints and examples for this versioned field.
decisionIdstringYesSee the schema constraints and examples for this versioned field.
scopeobjectYesSee the schema constraints and examples for this versioned field.
inputsobjectYesMinimized policy input values or references.
decisionenumYesSee the schema constraints and examples for this versioned field. Allowed values: allow, deny, approval-required, abstain.
reasonCodesarrayYesSee the schema constraints and examples for this versioned field.
requiredApprovalsarrayYesSee the schema constraints and examples for this versioned field.
approvalAuthorityarrayYesSee the schema constraints and examples for this versioned field.
issuedUtcstringYesUTC ISO 8601 timestamp ending in Z.
expiresUtcobjectYesSee the schema constraints and examples for this versioned field.
overridePolicyobjectYesSee the schema constraints and examples for this versioned field.
evidenceobjectYesSee the schema constraints and examples for this versioned field.
redactionobjectYesSee the schema constraints and examples for this versioned field.
reviewPathobjectYesSee 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

Download this example

{
    "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

Maintenance record

Found an error, outdated capability, or unclear category boundary? Submit a correction with a supporting source.