Audit & Replay
Blueprint · ← Step-up · Audit & replay · Policy scenarios →
If you can answer examiner questions from PEP/PDP logs alone, you have PGAR. If you need the chat transcript, you do not.
Audit is a verdict chain with policy version, immutable, written before side effects, redacted for retention.
What examiners ask
- Which policy version decided? Every log carries
pgar.payments.wire/v3, not "the system prompt from Tuesday." - Was execution blocked until attestation? Proof STEP_UP fired and ALLOW came only after four-eyes.
- Can you replay without model logs? Subject, action, resource, context, verdict, before side effects.
Minimum audit record
Minimum audit record (JSON)
{
"audit_id": "aud-7c3e",
"ts": "2026-07-10T14:22:01Z",
"subject_sub": "officer-123",
"action": "initiate_wire",
"resource": { "beneficiary_id": "bene-acme-441" },
"context_redacted": { "amount": 47500, "sanctions_status": "clear" },
"policy_version": "pgar.payments.wire/v3",
"verdict": "STEP_UP",
"reason_code": "wire_above_auto_approved",
"downstream_called": false
}
RAG extension: context pack log
For retrieval paths, also log the assembled context pack (sources, scores, policy version). Answers "what did the model see on March 12?"
See RAG retrieval.
Worked example: ev-refund-agent-2026-03
Examiner opens the evidence pack and these three rows. Chat is optional color. It is not the source of truth.
Refund audit rows matching the evidence pack (JSON)
[
{
"audit_id": "v-10041",
"use_case_id": "uc-refund-agent",
"action": "issue_refund",
"context_redacted": { "amount_aud": 80, "purpose": "duplicate_charge" },
"policy_version": "pdp-refund-write-v4",
"verdict": "ALLOW",
"downstream_called": true
},
{
"audit_id": "v-10058",
"use_case_id": "uc-refund-agent",
"action": "issue_refund",
"context_redacted": { "amount_aud": 750, "purpose": "duplicate_charge" },
"policy_version": "pdp-refund-write-v4",
"verdict": "STEP_UP",
"reason_code": "refund_above_auto_approved",
"downstream_called": false
},
{
"audit_id": "v-10062",
"use_case_id": "uc-refund-agent",
"action": "issue_refund",
"context_redacted": { "amount_aud": 80, "purpose": "goodwill_unmapped" },
"policy_version": "pdp-refund-write-v4",
"verdict": "DENY",
"reason_code": "purpose_mismatch",
"downstream_called": false
}
]
Replay v-10058 against pdp-refund-write-v4 without the attestation: still STEP_UP. After attaching att-2026-03-11-1842: ALLOW. If replay disagrees with the log, the pack is broken.
Failure classes
- Chat as audit: only conversation history, no PEP record
- Post-hoc narrative: log written after downstream success
- Missing policy version: cannot prove which rules applied
- PII in immutable log: retention violation
Replay tooling
- Ingest audit id or (subject, time range, action)
- Reconstruct SARAC from stored fields
- Re-run PDP against same policy version (regression) or current (what-if)
- Compare verdict and downstream_called flag
Release gate
- Audit completeness on ACTION cases: 100%
- Policy version present: 100%
- Verdict-before-downstream ordering: 100% on trace replay
Trace fields
audit_id, policy_version, verdict, reason_code, downstream_called, context_pack_id (RAG)
See: PEP enforcement · Eval plane Action