Async billing chaos evidence
Latest run (UTC): 2026-07-28T05:29:49Z
Verdict: PASS
Shape: production-like (Postgres SoT + Redis/BullMQ + isolated prove worker)
Artifact: audit-logs/billing-async-chaos-2026-07-28T05-29-49-220Z/
What this proves
| Chaos step | Observed |
|---|---|
| Worker SIGKILL mid-flight | yes (1 job already proving, 5 still accepted) |
| Redis BullMQ queue obliterated | yes |
| Postgres jobs survived | yes (all 6 rows intact) |
| Sweeper reconstructed queue | 6 claimed → re-enqueued |
| Every accepted job → one final receipt | 6/6 completed, receipt hash unchanged, 0 duplicate completions |
End-to-end wall time from kill → all finalized: ~3s (hotpath prove).
Reproduce
cd verifier-api
DATABASE_URL="postgresql://zkcaptcha:development@localhost:5432/zkcaptcha" \
REDIS_URL=redis://127.0.0.1:6379 REDIS_ENABLED=true REDIS_DISABLED=false \
DB_SSL=false CHAOS_JOB_COUNT=6 \
npm run chaos:billing-asyncWrites audit-logs/billing-async-chaos-<ts>/README.md + chaos-evidence.json.
Unit/integration companion (5/5): npm run test:billing-async-recovery.
Statement
QuantZK removes proof generation from the live request path without sacrificing durable acceptance. Worker death and Redis queue loss do not drop accepted events: PostgreSQL remains the source of truth, and the sweeper reconstructs prove work until each job has one final receipt.
Full timeline and per-job receipt hashes: see the artifact README linked above.
