# nemesiswave/faultline-bosch-hackathon-2026 architecture

> Architecture diagram of the GitHub repository nemesiswave/faultline-bosch-hackathon-2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nemesiswave/faultline-bosch-hackathon-2026
- Repository: https://github.com/nemesiswave/faultline-bosch-hackathon-2026

## Overview

Faultline is a local chaos-engineering controller for the OpenTelemetry Demo. The main workflow maps service dependencies and captures healthy metrics, then runs one allowlisted fault while monitoring shopper-facing metrics; it restores the fault, measures recovery, and logs the experiment. The map and baseline are separate setup steps, not an automatic pipeline into the controller. Planner and reporter AI features are described as future work and have no implementation path in the tree. Relationships below are limited to source excerpts and README evidence.

Main entry points: [`mapper/build_map.py`](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/mapper/build_map.py) (Map builder), [`controller/safety.py`](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/controller/safety.py) (Safety controller), [`baseline/capture.py`](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/baseline/capture.py) (Baseline capture), [`chaos/inject.py`](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/chaos/inject.py) (Fault injector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mapping["Dependency mapping"]
  node_mapper["Map builder<br/>[build_map.py]"]
  node_map_drawer["Map drawing<br/>[draw_map.py]"]
  node_map_config["Map overrides<br/>[map_overrides.yaml]"]
end

subgraph group_measurement["Health measurement"]
  node_baseline_capture["Baseline capture<br/>[capture.py]"]
  node_metrics["Metrics client<br/>[metrics.py]"]
end

subgraph group_experiment["Safe experiments"]
  node_safety["Safety controller<br/>[safety.py]"]
  node_injector["Fault injector<br/>[inject.py]"]
  node_target_config["Target allowlist<br/>[targets.yaml]"]
  node_threshold_config["Safety thresholds<br/>[thresholds.yaml]"]
  node_emergency_stop["Emergency stop<br/>[stop_all.ps1]"]
end

subgraph group_outputs["Run artifacts"]
  node_map_report["Dependency map"]
  node_baseline_report["Baseline report<br/>[baseline.json]"]
  node_experiment_log["Experiment log<br/>[experiments.jsonl]"]
end

node_operator(("Operator"))
node_compose["Demo Compose"]
node_jaeger["Jaeger traces"]
node_locust["Locust stats"]
node_prometheus["Prometheus metrics"]
node_docker["Docker containers"]

node_operator -->|"runs"| node_mapper
node_operator -->|"runs"| node_baseline_capture
node_operator -->|"starts experiment"| node_safety
node_operator -->|"stops faults"| node_emergency_stop
node_mapper -->|"reads config"| node_compose
node_mapper -->|"queries traces"| node_jaeger
node_mapper -->|"loads overrides"| node_map_config
node_mapper -->|"draws map"| node_map_drawer
node_mapper -->|"writes map"| node_map_report
node_baseline_capture -->|"reads metrics"| node_metrics
node_baseline_capture -->|"checks health"| node_docker
node_baseline_capture -->|"writes baseline"| node_baseline_report
node_metrics -->|"reads shopper stats"| node_locust
node_metrics -->|"queries service metrics"| node_prometheus
node_safety -->|"samples metrics"| node_metrics
node_safety -->|"creates and restores fault"| node_injector
node_safety -->|"reads baseline"| node_baseline_report
node_safety -->|"loads thresholds"| node_threshold_config
node_safety -->|"logs findings"| node_experiment_log
node_injector -->|"checks target"| node_target_config
node_injector -->|"limits duration"| node_threshold_config
node_injector -->|"injects and restores"| node_docker
node_emergency_stop -->|"restores containers"| node_docker

click node_mapper "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/mapper/build_map.py"
click node_map_drawer "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/mapper/draw_map.py"
click node_map_config "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/config/map_overrides.yaml"
click node_baseline_capture "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/baseline/capture.py"
click node_metrics "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/controller/metrics.py"
click node_safety "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/controller/safety.py"
click node_injector "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/chaos/inject.py"
click node_target_config "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/config/targets.yaml"
click node_threshold_config "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/config/thresholds.yaml"
click node_emergency_stop "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/chaos/stop_all.ps1"
click node_map_report "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/reports/dependency_map.json"
click node_baseline_report "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/reports/baseline.json"
click node_experiment_log "https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/reports/experiments.jsonl"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mapper,node_map_drawer,node_map_config toneBlue
class node_baseline_capture,node_metrics toneAmber
class node_safety,node_injector,node_target_config,node_threshold_config,node_emergency_stop toneMint
class node_map_report,node_baseline_report,node_experiment_log toneRose
class node_operator,node_compose,node_jaeger,node_locust,node_prometheus,node_docker toneIndigo
```

## Components

### Dependency mapping

- [Map builder](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/mapper/build_map.py): `mapper/build_map.py`
- [Map drawing](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/mapper/draw_map.py): `mapper/draw_map.py`
- [Map overrides](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/config/map_overrides.yaml): `config/map_overrides.yaml`

### Health measurement

- [Baseline capture](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/baseline/capture.py): `baseline/capture.py`
- [Metrics client](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/controller/metrics.py): `controller/metrics.py`

### Safe experiments

- [Safety controller](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/controller/safety.py): `controller/safety.py`
- [Fault injector](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/chaos/inject.py): `chaos/inject.py`
- [Target allowlist](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/config/targets.yaml): `config/targets.yaml`
- [Safety thresholds](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/config/thresholds.yaml): `config/thresholds.yaml`
- [Emergency stop](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/chaos/stop_all.ps1): `chaos/stop_all.ps1`

### Run artifacts

- [Dependency map](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/reports/dependency_map.json): `reports/dependency_map.json`
- [Baseline report](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/reports/baseline.json): `reports/baseline.json`
- [Experiment log](https://github.com/nemesiswave/faultline-bosch-hackathon-2026/blob/master/reports/experiments.jsonl): `reports/experiments.jsonl`

### Other components

- **Operator**
- **Demo Compose**
- **Jaeger traces**
- **Locust stats**
- **Prometheus metrics**
- **Docker containers**

## Connections

- Operator → Map builder: runs (evidence: `README.md`)
- Operator → Baseline capture: runs (evidence: `README.md`)
- Operator → Safety controller: starts experiment (evidence: `README.md`)
- Operator → Emergency stop: stops faults (evidence: `README.md`)
- Map builder → Demo Compose: reads config (evidence: `mapper/build_map.py`)
- Map builder → Jaeger traces: queries traces (evidence: `mapper/build_map.py`)
- Map builder → Map overrides: loads overrides (evidence: `mapper/build_map.py`)
- Map builder → Map drawing: draws map (evidence: `mapper/build_map.py`)
- Map builder → Dependency map: writes map (evidence: `README.md`)
- Baseline capture → Metrics client: reads metrics (evidence: `baseline/capture.py`)
- Baseline capture → Docker containers: checks health (evidence: `baseline/capture.py`)
- Baseline capture → Baseline report: writes baseline (evidence: `README.md`)
- Metrics client → Locust stats: reads shopper stats (evidence: `controller/metrics.py`)
- Metrics client → Prometheus metrics: queries service metrics (evidence: `controller/metrics.py`)
- Safety controller → Metrics client: samples metrics (evidence: `controller/safety.py`)
- Safety controller → Fault injector: creates and restores fault (evidence: `controller/safety.py`)
- Safety controller → Baseline report: reads baseline (evidence: `controller/safety.py`)
- Safety controller → Safety thresholds: loads thresholds (evidence: `controller/safety.py`)
- Safety controller → Experiment log: logs findings (evidence: `controller/safety.py`)
- Fault injector → Target allowlist: checks target (evidence: `chaos/inject.py`)
- Fault injector → Safety thresholds: limits duration (evidence: `chaos/inject.py`)
- Fault injector → Docker containers: injects and restores (evidence: `chaos/inject.py`)
- Emergency stop → Docker containers: restores containers (evidence: `README.md`)
