Pitstop Resilience Console
AI-assisted chaos engineering for a ten-service .NET system. The model recommends an experiment, a person approves it, and the kill switch never depends on either.
Began as a team entry in the Bosch chaos engineering hackathon. This repository is my personal continuation of that work.
- automated tests, plus 56 recovery-contract assertions
- 212
- recorded fault-injection runs
- 29
- failure types, each registered only after its cleanup was proven
- 5
- registration failures after fixing a publisher race
- 30% → 0
- C#
- .NET 10
- ASP.NET Core
- Docker
- RabbitMQ
- SQL Server
- Groq
- Ollama
- xUnit
- PowerShell
- GitHub Actions

The problem
Chaos engineering with an AI planner is only safe if the model can never act on its own. I wanted to break a real microservice system on purpose, measure what users would see, and prove it recovers, with every safety control independent of the model.
Pipeline
- Measure baseline
- Advisory planner, in fallback orderGroqLocal OllamaNo recommendation
- Human approval
- One bounded fault
- Watch user-facing pages
- Verify recovery
- Rule-based score
How it works
The sandbox is Pitstop, an open-source garage management system: 13 containers, including three APIs, SQL Server and RabbitMQ, run locally with Docker Compose.
The console discovers the containers, probes the three user-facing modules every 2 seconds, and draws the dependency and event map.
Five failure types (kill-service, kill-rabbitmq, network-delay, packet-loss, kill-database), each behind explicit approval, a duration cap, an abort threshold and a STOP-file kill switch.
Every run writes samples and a report, and scores come from published rules in code. The planner uses Groq with a strict JSON schema, falls back to local Ollama, then to no recommendation, and can only choose from the fixed catalog.

The decision
- I chose
- Keep the model out of every path that acts: execution, rollback and scoring.
- Instead of
- Letting the planner choose targets and durations, or grade its own experiments.
- Because
- A provider error or a hallucinated value must never become permission to inject a fault. Out-of-range values are rejected rather than clamped, the kill switch is plain file and timer logic, and a detached watchdog container restores the target even if the orchestrator dies.
Results
| Experiment | Target | Cap | What it showed |
|---|---|---|---|
| kill-service | Workshop API | 60 s | Blast radius contained: 2 of 3 modules kept serving |
| kill-rabbitmq | RabbitMQ | 120 s | Every page stayed up while events were silently lost |
| network-delay | Workshop API | 60 s | Graceful degradation under uniform latency |
| packet-loss | Workshop API | 60 s | Partial, non-deterministic failure |
| kill-database | SQL Server | 30 s | Total failure: 0 of 3 pages served, writes refused |
What broke, and the fix
30% of customer registrations failed on a healthy system: a transient publisher raced a half-built connection.
Fixed. Registrations now fail 0 times in 30.
During a broker outage a customer row commits while its event is never published, and restoring the broker does not repair it.
Still open, rated high. The fix is a transactional outbox, which is documented but not built yet.
A dead service costs its caller a full timeout instead of failing fast.
Open, rated medium. The caller needs a circuit breaker.
What I would do next
- Build the transactional outbox, so a write and its event commit together.
- Verify the Groq path end to end. Today the fallback to local Ollama is what answers.
- Add an unpause watchdog, so a pause-service experiment can be registered safely.
- Record the demo video. The script is written; the video is not.