# omidrahimirad/ran-alarm-correlation-incident-timeline architecture

> Architecture diagram of the GitHub repository omidrahimirad/ran-alarm-correlation-incident-timeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omidrahimirad/ran-alarm-correlation-incident-timeline
- Repository: https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline

## Overview

This is a synthetic-data RAN incident-analysis prototype. Its principal workflow loads alarm, KPI, and change-event CSVs, detects degradations and correlates events into incident timelines, ranks root-cause candidates, and exports reports. A separate bounded, read-only investigation workflow queries incident evidence, compares hypotheses, verifies citations, and produces advisory reports; offline fixture evaluation measures that workflow. Edges follow the README and source-index references; unsampled implementation details are not assumed.

Main entry points: [`src/ran_incident_timeline/cli.py`](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/cli.py) (CLI Commands), [`src/ran_incident_timeline/evaluation/agent_benchmark.py`](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/evaluation/agent_benchmark.py) (Fixture Benchmark), [`src/ran_incident_timeline/investigation/store.py`](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/store.py) (Incident Evidence Store), [`src/ran_incident_timeline/correlation.py`](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/correlation.py) (KPI And Event Correlation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Deterministic Analysis"]
  node_domain_models["Incident Models<br/>[models.py]"]
  node_correlation["KPI And Event Correlation<br/>[correlation.py]"]
  node_timeline["Timeline Assembly<br/>[timeline.py]"]
  node_root_cause["Candidate Ranking<br/>[root_cause.py]"]
  node_reporting["Report Export<br/>[reporting.py]"]
end

subgraph group_investigation["Read-Only Investigation"]
  node_incident_store[("Incident Evidence Store<br/>[store.py]")]
  node_investigation_models["Investigation Models<br/>[models.py]"]
  node_evidence_tools["Evidence Tools<br/>[tools.py]"]
  node_provider_contract["Provider Contract<br/>[base.py]"]
  node_fixture_provider["Fixture Provider<br/>[fixture.py]"]
  node_agent["Bounded Agent<br/>[agent.py]"]
  node_verifier["Evidence Verifier<br/>[verifier.py]"]
end

subgraph group_evaluation["Fixture Evaluation"]
  node_benchmark["Fixture Benchmark<br/>[agent_benchmark.py]"]
  node_metrics["Agent Metrics<br/>[agent_metrics.py]"]
  node_error_analysis["Error Analysis<br/>[error_analysis.py]"]
end

subgraph group_interface["CLI And Data"]
  node_cli["CLI Commands<br/>[cli.py]"]
  node_loader["CSV Loader<br/>[data_loader.py]"]
  node_synthetic["Synthetic Data<br/>[synthetic_data.py]"]
end

node_operator(("Operator"))
node_csv_inputs["RAN CSV Inputs"]

node_operator -->|"runs"| node_cli
node_csv_inputs -->|"loads"| node_loader
node_cli -->|"loads inputs"| node_loader
node_cli -->|"generates demo data"| node_synthetic
node_loader -->|"validates as"| node_domain_models
node_cli -->|"runs analysis"| node_correlation
node_correlation -->|"builds incidents"| node_domain_models
node_correlation -->|"assembles timeline"| node_timeline
node_correlation -->|"scores candidates"| node_root_cause
node_cli -->|"exports reports"| node_reporting
node_reporting -->|"renders incidents"| node_domain_models
node_reporting -->|"renders timeline"| node_timeline
node_cli -->|"creates investigation store"| node_incident_store
node_incident_store -->|"reads incident data"| node_domain_models
node_incident_store -->|"gets time bounds"| node_timeline
node_cli -->|"creates tools"| node_evidence_tools
node_evidence_tools -->|"queries evidence"| node_incident_store
node_agent -->|"dispatches calls"| node_evidence_tools
node_agent -->|"requests decisions"| node_provider_contract
node_fixture_provider -->|"implements"| node_provider_contract
node_cli -->|"selects fixture"| node_fixture_provider
node_agent -->|"records trajectory"| node_investigation_models
node_verifier -->|"rechecks evidence"| node_evidence_tools
node_verifier -->|"checks observable evidence"| node_incident_store
node_cli -->|"runs investigation"| node_agent
node_benchmark -->|"loads evaluation data"| node_loader
node_benchmark -->|"builds incidents"| node_correlation
node_benchmark -->|"creates store"| node_incident_store
node_benchmark -->|"creates tools"| node_evidence_tools
node_benchmark -->|"runs fixture"| node_fixture_provider
node_benchmark -->|"runs investigations"| node_agent
node_benchmark -->|"scores results"| node_metrics
node_error_analysis -->|"uses metrics"| node_metrics

click node_cli "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/cli.py"
click node_loader "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/data_loader.py"
click node_synthetic "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/synthetic_data.py"
click node_domain_models "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/models.py"
click node_correlation "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/correlation.py"
click node_timeline "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/timeline.py"
click node_root_cause "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/root_cause.py"
click node_reporting "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/reporting.py"
click node_incident_store "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/store.py"
click node_investigation_models "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/models.py"
click node_evidence_tools "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/tools.py"
click node_provider_contract "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/providers/base.py"
click node_fixture_provider "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/providers/fixture.py"
click node_agent "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/agent.py"
click node_verifier "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/verifier.py"
click node_benchmark "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/evaluation/agent_benchmark.py"
click node_metrics "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/evaluation/agent_metrics.py"
click node_error_analysis "https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/evaluation/error_analysis.py"

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_domain_models,node_correlation,node_timeline,node_root_cause,node_reporting toneBlue
class node_incident_store,node_investigation_models,node_evidence_tools,node_provider_contract,node_fixture_provider,node_agent,node_verifier toneAmber
class node_benchmark,node_metrics,node_error_analysis toneMint
class node_cli,node_loader,node_synthetic toneRose
class node_operator,node_csv_inputs toneIndigo
```

## Components

### Deterministic Analysis

- [Incident Models](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/models.py): `src/ran_incident_timeline/models.py`
- [KPI And Event Correlation](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/correlation.py): `src/ran_incident_timeline/correlation.py`
- [Timeline Assembly](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/timeline.py): `src/ran_incident_timeline/timeline.py`
- [Candidate Ranking](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/root_cause.py): `src/ran_incident_timeline/root_cause.py`
- [Report Export](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/reporting.py): `src/ran_incident_timeline/reporting.py`

### Read-Only Investigation

- [Incident Evidence Store](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/store.py): `src/ran_incident_timeline/investigation/store.py`
- [Investigation Models](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/models.py): `src/ran_incident_timeline/investigation/models.py`
- [Evidence Tools](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/tools.py): `src/ran_incident_timeline/investigation/tools.py`
- [Provider Contract](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/providers/base.py): `src/ran_incident_timeline/investigation/providers/base.py`
- [Fixture Provider](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/providers/fixture.py): `src/ran_incident_timeline/investigation/providers/fixture.py`
- [Bounded Agent](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/agent.py): `src/ran_incident_timeline/investigation/agent.py`
- [Evidence Verifier](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/investigation/verifier.py): `src/ran_incident_timeline/investigation/verifier.py`

### Fixture Evaluation

- [Fixture Benchmark](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/evaluation/agent_benchmark.py): `src/ran_incident_timeline/evaluation/agent_benchmark.py`
- [Agent Metrics](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/evaluation/agent_metrics.py): `src/ran_incident_timeline/evaluation/agent_metrics.py`
- [Error Analysis](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/evaluation/error_analysis.py): `src/ran_incident_timeline/evaluation/error_analysis.py`

### CLI And Data

- [CLI Commands](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/cli.py): `src/ran_incident_timeline/cli.py`
- [CSV Loader](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/data_loader.py): `src/ran_incident_timeline/data_loader.py`
- [Synthetic Data](https://github.com/omidrahimirad/ran-alarm-correlation-incident-timeline/blob/main/src/ran_incident_timeline/synthetic_data.py): `src/ran_incident_timeline/synthetic_data.py`

### Other components

- **Operator**
- **RAN CSV Inputs**

## Connections

- Operator → CLI Commands: runs (evidence: `README.md`)
- RAN CSV Inputs → CSV Loader: loads (evidence: `README.md`)
- CLI Commands → CSV Loader: loads inputs (evidence: `src/ran_incident_timeline/cli.py`)
- CLI Commands → Synthetic Data: generates demo data (evidence: `src/ran_incident_timeline/cli.py`)
- CSV Loader → Incident Models: validates as (evidence: `src/ran_incident_timeline/data_loader.py`)
- CLI Commands → KPI And Event Correlation: runs analysis (evidence: `src/ran_incident_timeline/cli.py`)
- KPI And Event Correlation → Incident Models: builds incidents (evidence: `src/ran_incident_timeline/correlation.py`)
- KPI And Event Correlation → Timeline Assembly: assembles timeline (evidence: `src/ran_incident_timeline/correlation.py`)
- KPI And Event Correlation → Candidate Ranking: scores candidates (evidence: `src/ran_incident_timeline/correlation.py`)
- CLI Commands → Report Export: exports reports (evidence: `src/ran_incident_timeline/cli.py`)
- Report Export → Incident Models: renders incidents (evidence: `src/ran_incident_timeline/reporting.py`)
- Report Export → Timeline Assembly: renders timeline (evidence: `src/ran_incident_timeline/reporting.py`)
- CLI Commands → Incident Evidence Store: creates investigation store (evidence: `src/ran_incident_timeline/cli.py`)
- Incident Evidence Store → Incident Models: reads incident data (evidence: `src/ran_incident_timeline/investigation/store.py`)
- Incident Evidence Store → Timeline Assembly: gets time bounds (evidence: `src/ran_incident_timeline/investigation/store.py`)
- CLI Commands → Evidence Tools: creates tools (evidence: `src/ran_incident_timeline/cli.py`)
- Evidence Tools → Incident Evidence Store: queries evidence (evidence: `src/ran_incident_timeline/investigation/tools.py`)
- Bounded Agent → Evidence Tools: dispatches calls (evidence: `src/ran_incident_timeline/investigation/agent.py`)
- Bounded Agent → Provider Contract: requests decisions (evidence: `src/ran_incident_timeline/investigation/agent.py`)
- Fixture Provider → Provider Contract: implements (evidence: `src/ran_incident_timeline/investigation/providers/fixture.py`)
- CLI Commands → Fixture Provider: selects fixture (evidence: `src/ran_incident_timeline/cli.py`)
- Bounded Agent → Investigation Models: records trajectory (evidence: `src/ran_incident_timeline/investigation/agent.py`)
- Evidence Verifier → Evidence Tools: rechecks evidence (evidence: `src/ran_incident_timeline/investigation/verifier.py`)
- Evidence Verifier → Incident Evidence Store: checks observable evidence (evidence: `src/ran_incident_timeline/investigation/verifier.py`)
- CLI Commands → Bounded Agent: runs investigation (evidence: `src/ran_incident_timeline/cli.py`)
- Fixture Benchmark → CSV Loader: loads evaluation data (evidence: `src/ran_incident_timeline/evaluation/agent_benchmark.py`)
- Fixture Benchmark → KPI And Event Correlation: builds incidents (evidence: `src/ran_incident_timeline/evaluation/agent_benchmark.py`)
- Fixture Benchmark → Incident Evidence Store: creates store (evidence: `src/ran_incident_timeline/evaluation/agent_benchmark.py`)
- Fixture Benchmark → Evidence Tools: creates tools (evidence: `src/ran_incident_timeline/evaluation/agent_benchmark.py`)
- Fixture Benchmark → Fixture Provider: runs fixture (evidence: `src/ran_incident_timeline/evaluation/agent_benchmark.py`)
- Fixture Benchmark → Bounded Agent: runs investigations (evidence: `src/ran_incident_timeline/evaluation/agent_benchmark.py`)
- Fixture Benchmark → Agent Metrics: scores results (evidence: `src/ran_incident_timeline/evaluation/agent_benchmark.py`)
- Error Analysis → Agent Metrics: uses metrics (evidence: `src/ran_incident_timeline/evaluation/error_analysis.py`)
