Skip to content

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 console's Observe view: 13 of 13 services up, a monitoring baseline for three modules and a dependency map.

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

  1. Measure baseline
  2. Advisory planner, in fallback orderGroqLocal OllamaNo recommendation
  3. Human approval
  4. One bounded fault
  5. Watch user-facing pages
  6. Verify recovery
  7. Rule-based score
A model may propose one experiment from a fixed catalog. A person approves it; injection, rollback and scoring never touch the model. The highlighted stage is where the key decision sits.

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 console's Evidence view: deterministic scores per run and a ranked list of findings.
The Evidence view. Every score comes from rules in code, never from a model.

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

The five registered experiments, each with a hard duration cap.
ExperimentTargetCapWhat it showed
kill-serviceWorkshop API60 sBlast radius contained: 2 of 3 modules kept serving
kill-rabbitmqRabbitMQ120 sEvery page stayed up while events were silently lost
network-delayWorkshop API60 sGraceful degradation under uniform latency
packet-lossWorkshop API60 sPartial, non-deterministic failure
kill-databaseSQL Server30 sTotal failure: 0 of 3 pages served, writes refused

What broke, and the fix

  1. 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.

  2. 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.

  3. 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.