Skip to content

Project 4 SLO Copilot

Huzefaaa2 edited this page Jan 26, 2026 · 4 revisions

Project 4 – SLO Copilot + Trace‑Based Testing

SLO Copilot generates SLOs from real traces, validates them with trace‑based tests, and emits guardrail snippets to enforce reliability gates. It integrates with CAAT for sampling guidance, eBPF Bot for coverage signals, and T‑RAG for RCA when SLOs fail.

Architecture

flowchart LR
  Traces[Trace Data] --> Copilot[SLO Copilot]
  Copilot --> Tests[Trace-Based Tests]
  Copilot --> Policies[Guardrail Policies]
  Copilot --> CAAT[CAAT Sampling]
  Copilot --> EBPF[eBPF Coverage Bot]
  Copilot --> TRAG[T-RAG RCA]
Loading

What’s implemented

  • SLO generation from latency/error/availability baselines.
  • Trace‑based fault tests (latency spikes, error bursts, partial outages).
  • Guardrail policy snippets for deployment gates.
  • OpenSLO export (JSON + YAML) and JSON schema.
  • Integrations: CAAT, eBPF Bot, T‑RAG, and PII Guardrail.

Validation + Store + CI Gate

Capability Description CLI
OpenSLO validation Validate OpenSLO payloads against schema --validate-openslo
SLO store Persist SLOs to JSON store (merge/replace) --slo-store, --store-mode
CI gate Fail pipeline on SLO/test/guardrail violations python -m slo_copilot.ci_gate

Quickstart

From the repo root:

PYTHONPATH=projects/slo-copilot/src python3 -m slo_copilot.demo_all_cli \
  --trace projects/slo-copilot/examples/sample_trace.json \
  --telemetry-volume 0.9 \
  --telemetry-volume 1.1

Export OpenSLO:

PYTHONPATH=projects/slo-copilot/src python3 -m slo_copilot.cli \
  --trace projects/slo-copilot/examples/sample_trace.json \
  --export-openslo projects/slo-copilot/exports/openslo.json \
  --export-openslo-yaml projects/slo-copilot/exports/openslo.yaml

Validate OpenSLO:

PYTHONPATH=projects/slo-copilot/src python3 -m slo_copilot.cli \
  --trace projects/slo-copilot/examples/sample_trace.json \
  --validate-openslo

Persist SLOs:

PYTHONPATH=projects/slo-copilot/src python3 -m slo_copilot.cli \
  --trace projects/slo-copilot/examples/sample_trace.json \
  --slo-store projects/slo-copilot/data/slo_store.json \
  --store-mode merge

CI gate:

PYTHONPATH=projects/slo-copilot/src python3 -m slo_copilot.ci_gate \
  --trace projects/slo-copilot/examples/sample_trace.json \
  --fail-on any

Key files

  • projects/slo-copilot/src/slo_copilot/copilot.py
  • projects/slo-copilot/src/slo_copilot/trace_tests.py
  • projects/slo-copilot/src/slo_copilot/policy_emitter.py
  • projects/slo-copilot/src/slo_copilot/exports.py

Integrations

  • CAAT: budget forecasts + sampling action recommendations.
  • eBPF Bot: coverage ratio and missing signal suggestions.
  • T‑RAG: RCA on SLO violations.
  • PII Guardrail: scrubbing spans before LLM use.

Clone this wiki locally