VARUX AXIS Deterministic PostgreSQL Write-Path Control
v0.6 · Pilot Readiness
AXIS Documentation / Core Concepts / Audit & Evidence

Audit & Evidence

VerifiedWAL + hash chainEvidence Bundle V1

"No protected production write without durable evidence." AXIS writes decision evidence before execution and result evidence after; the audit trail is a hash-linked append-only WAL with a JSONL projection.

Hash chain

event_001 prev: GENESIS hash = H(payload) prev_hash event_002 prev: event_001.hash hash = H(payload+prev) prev_hash event_003 prev: event_002.hash hash = H(payload+prev) prev_hash event_N prev: event_N-1.hash hash = H(payload+prev) each event_hash binds the previous event — tampering breaks the chain
Every event stores event_hash and previous_hash; a change in any earlier record invalidates all later hashes.

Event categories

CategoryExamples
Request / decisionrequest_received, decision_recorded, approval_created, approval_resolved, approval_expired
Executionexecution_dispatched, execution_success, execution_failure, execution_state_unknown
Policy lifecyclepolicy_loaded, policy_validated, policy_activated, policy_rollback, policy_candidate_created, policy_candidate_rejected
Systemhealth_fail, rate_limit_hit, oversized_request, startup, shutdown

Each event carries event_id, event_hash, previous_hash, timestamp, event_type, policy_version, operation, fingerprint, decision, actor, app, tenant, env, session_id, approval_id, and context-specific fields (reason codes, error codes, WAL seq, evidence bundle reference, fallback reason).

Storage layout

Verification

curl
# verify evidence integrity for the whole chain
curl -sS http://localhost:6543/evidence/verify

# per-audit-file verification
curl -sS -X POST http://localhost:6543/audit/verify \
  -H "Content-Type: application/json" \
  -d '{"audit_file": "./audit.wal"}'

# range evidence export (Evidence Bundle V1)
curl -sS -X POST http://localhost:6543/audit/evidence \
  -H "Content-Type: application/json" \
  -d '{"start_seq": 1, "end_seq": 100, "reason": "demo"}'
EndpointChecks
GET /evidence/verifyWAL existence, read lock, header, event count, per-event hash recompute, previous_hash linkage, seq continuity, chain start, trailing bytes. Returns status: ok / corruption_detected / partial.
POST /audit/verifySame checks on a specified audit file (WAL or JSONL with indices).
POST /audit/evidenceRange export as bundle_type: axis.evidence_bundle.v1 with first/last seq, first/last event hash, payload count; optional Ed25519 signature field when signing is enabled. Verify with verify_ed25519 or local public-key verification; fetch public key from GET /audit/evidence/signing-public-key.

Optional evidence signing

Evidence bundles can be Ed25519-signed when configured (AXIS_EVIDENCE_SIGNING_ENABLED=true plus key paths). Signing is optional in v0.6–v0.9 and is not part of the core integrity guarantee; the hash chain is the primary protection. Private keys must be protected; public keys are exposed for local verification.

Guarantees and limits

Keep WAL and JSONL on the same volume for local review; run /evidence/verify after restarts or migrations and include a copy of the WAL in evidence bundles.

Related: Request Lifecycle · Security Model · API Reference