Skip to content

Chaos Testing

Document ID: TEST-005
File Path: docs/15-testing/chaos-testing.md
Version: 1.0.0
Status: Draft
Owner: Quality Engineering Team
Last Updated: 2026-06-27


This document defines chaos testing — deliberately injecting failures to verify the Wovyr AI Platform degrades gracefully and recovers, validating the resilience mechanisms specified across subsystems.


State a steady-state hypothesis (e.g. "agent runs succeed > 99.5%")
Inject a fault (kill a provider, a worker, a DB replica)
Observe: does steady state hold? does it recover?
Fix gaps; automate the experiment

Experiments start small (one fault, staging) and graduate to scheduled production game-days.


FaultValidates
LLM provider down/slowGateway failover & circuit breaking
Tool worker killedReschedule of idempotent work
Sandbox provision failureRetry on another worker
Qdrant unavailableDegraded keyword retrieval
Redis unavailableHot-cache bypass, still durable
Postgres failoverReads from replica; write recovery
NATS partitionEvent delivery + at-least-once handling
Network latency/lossTimeouts, retries, backpressure
Node lossRescheduling, drain behavior

Each experiment asserts the documented behavior, e.g.:

  • A provider outage produces successful failover with no user-visible failure while a healthy provider exists (resilience).
  • A worker crash mid-execution reschedules idempotent tools and surfaces clear errors for non-idempotent ones.
  • Cache/store outages degrade (not fail), flagged via degraded responses.

  • Experiments are scoped (one tenant/zone) with automatic abort if steady-state SLOs breach beyond a guardrail.
  • Production game-days run in low-traffic windows with on-call present and a rollback plan.

  • Fault injection at the infra layer (e.g. Chaos Mesh/Litmus on Kubernetes).
  • Application-level fault hooks (configurable error/latency injection) for targeted experiments behind a flag.

Experiments rely on metrics, traces, alerts to confirm detection and recovery — a fault that fires no alert is itself a finding.


After each fault, verify the system returns to steady state automatically (self-healing) within target time, and that no data was lost (system of record intact, derived stores rebuilt — storage recovery).


  • Automated chaos in staging on a schedule.
  • Periodic production game-days for major releases.



VersionDateDescription
1.0.02026-06-27Initial Chaos Testing specification