ZAR-AR
End-to-End Audit Replay Flow
1. Purpose
The Audit Replay Flow enables full deterministic reconstruction of any signal produced within ZAYAZ.
It allows auditors, regulators, and internal systems to:
- trace a data point back to its origin
- verify all transformations applied
- reproduce the exact computation path
- validate trust decisions
ZAYAZ does not just store results — it can replay how they were produced.
2. Core Principle
Every signal instance is reconstructable through three linked layers:
USO (What happened)
→ TrustGate (Was it valid?)
→ Execution Audit (How exactly did it happen?)
3. Replay Architecture
4. Replay Flow (Step-by-Step)
Step 1 — Identify Signal Instance
Start with a known uso_id:
SELECT *
FROM zar.uso_instance
WHERE uso_id = '0196F...';
This returns:
- csi (signal type)
- origin_chain (CMIs)
- origin_chain_codes
- trustgate_event_id
Step 2 — Resolve Producing Artifacts
SELECT *
FROM zar.cmi_registry
WHERE cmi = ANY(origin_chain);
This provides:
- exact artifact versions
- git_sha
- build_hash
- execution references
Step 3 — Retrieve Validation Decisions
SELECT *
FROM zar.trustgate_telemetry
WHERE trustgate_event_id = 'tg_evt_...';
Returns:
- trust_score
- policy_id
- validator_id
- decision (pass, fail, etc.)
Step 4 — Retrieve Execution Events
SELECT *
FROM zar.execution_audit_event
WHERE uso_id = '0196F...'
ORDER BY observed_at;
Returns:
- input payloads
- output payloads
- transformation steps
- replay context
Step 5 — Reconstruct Execution
Using:
origin_chain(CMIs)execution_audit_eventgit_sha
The system:
- loads exact code versions
- replays transformations in order
- reproduces final output
Step 6 — Compare Results
| Check | Description |
|---|---|
| Output match | Recomputed output vs stored output |
| Hash validation | Input/output integrity |
| Trust consistency | Same TrustGate decision reproduced |
5. Example Replay Scenario
Input
{
"uso_id": "0196F...",
"csi": "MICE.InvoiceEmissions.OUTPUT.CO2E.1_0",
"origin_chain_codes": ["MIE12","TG3K7"]
}
Replay Result
{
"replay_status": "success",
"output_match": true,
"trust_consistent": true,
"recomputed_trust_score": 0.9825,
"deviations": []
}
6. TrustGate Integration
TrustGate plays a critical role in replay:
- validates the original execution
- provides policy + validator context
- allows recomputation of trust scores
Key Fields
| Field | Purpose |
|---|---|
trustgate_event_id | Link between USO and validation |
policy_id | Governing rule |
validator_id | Validation logic |
trust_score | Confidence metric |
7. Execution Audit Layer
Execution audit events provide full replay fidelity.
Stored Information
| Category | Description |
|---|---|
| Input | Raw payload before processing |
| Output | Result after processing |
| Transformation | Operation performed |
| Engine | Executing artifact (CMI) |
| Context | Runtime metadata |
8. Guarantees
The replay system guarantees:
| Guarantee | Description |
|---|---|
| Determinism | Same input + same code → same output |
| Traceability | Full lineage from origin to output |
| Verifiability | Independent replay possible |
| Integrity | Hash validation across steps |
9. Failure Modes
| Failure | Meaning |
|---|---|
| Output mismatch | Code changed or data corrupted |
| Missing artifact | ZAR registry incomplete |
| Missing audit event | Incomplete logging |
| Trust mismatch | Validation logic drift |
10. Design Principles
- Separation of concerns
- USO = identity + lineage
- TrustGate = validation
- Audit = execution detail
- Replay over storage
- System prioritizes reproducibility over redundancy
- Deterministic architecture
- No hidden transformations
- Audit-first design
- Every signal is inherently auditable
11. Strategic Impact
This architecture enables:
- CSRD-grade auditability
- ISO-compliant traceability
- Financial-grade data verification
- Regulator-level transparency
ZAYAZ transforms ESG reporting from static disclosure into reproducible computation.
12. Extensions
- Cryptographic signing of audit chains
- Cross-system replay (multi-tenant verification)
- Zero-knowledge proof validation
- Regulator API access
Summary
The Audit Replay Flow ensures that:
- every signal can be reconstructed
- every decision can be explained
- every output can be verified
If it cannot be replayed, it cannot be trusted.