incident-commander / openenv.yaml
r1cksync
feat: curriculum + adversarial designer + 3-persona LLM judge + phase-aware rewards + GRPO pipeline
d3728d5
Raw
History Blame
4.51 kB
name: incident-commander
version: "2.0.0"
description: >
SRE incident response RL environment with real Kubernetes backend,
self-escalating curriculum, LLM-designed adversarial scenarios, and
a 3-persona LLM judge. An AI agent plays an on-call Site Reliability
Engineer at AcmeCorp, diagnosing and mitigating production incidents
on a live e-commerce platform. Observations come from Prometheus
metrics, Loki logs, Alertmanager alerts, and distributed traces.
Write actions execute against a mock cluster by default and can be
routed to real kubectl commands via REAL_K8S=true. Features
context-gated rewards, phase-aware bonuses (triage/investigate/
fix/verify), repeat-command penalties, multi-fault scenarios on
advanced/expert tiers, and holistic per-episode grading.
author: IncidentCommander Team
license: MIT
tasks:
- id: task1
name: Redis Connection Pool Exhaustion
difficulty: easy
target_score: 0.80
description: >
Network latency injection between inventory-service and Redis
causes connection pool exhaustion. Agent must identify the
Chaos Mesh experiment and delete it.
- id: task2
name: Cascading Failure via Payments OOM
difficulty: medium
target_score: 0.45
description: >
Memory stress on payments-api causes OOM kills, which cascades
to Kafka consumer lag on inventory-service. The root cause is
payments-api, not inventory-service. Agent must rollback
payments-api deployment.
- id: task3
name: Silent Decimal Corruption
difficulty: hard
target_score: 0.20
description: >
A bad deployment (v2.3.2) silently truncates order totals from
NUMERIC(12,4) to NUMERIC(12,2). A concurrent postgres VACUUM
ANALYZE creates a red herring CPU spike. Agent must identify
the decimal bug, rollback, and recommend a data audit.
- id: task4
name: Kafka Broker Network Partition
difficulty: easy
target_score: 0.80
description: >
Network partition isolates Kafka broker from application pods,
causing consumer lag >5000 messages across order-worker and
notification-service. Agent must find and delete the Chaos Mesh
network partition experiment.
- id: task5
name: DNS Resolution Failure
difficulty: medium
target_score: 0.45
description: >
DNS chaos injection causes NXDOMAIN and resolution timeouts
across all services. checkout-frontend shows 502 errors.
Health check "connection refused" errors are secondary symptoms,
not the root cause. Agent must delete the DNS chaos experiment.
- id: task6
name: TLS Certificate Expiry Cascade
difficulty: hard
target_score: 0.20
description: >
Expired mTLS certificate breaks the payments-api to postgres
connection path. All database queries fail with x509 errors.
ECONNRESET and upstream timeout alerts across other services
are symptoms of the cascade. Agent must apply a config patch
to rotate the certificate.
- id: task7
name: ConfigMap Hot-Reload Race Condition
difficulty: hard
target_score: 0.20
description: >
A ConfigMap update triggers hot-reload in inventory-service
but a race condition causes 2 of 4 pods to load new config
while 2 retain stale values. Redis pool saturation and GC
pause alerts are unrelated red herrings. Agent must restart
inventory-service pods to force consistent config.
observation_space: structured_dict
action_space: discrete_with_typed_params
reward_range: [-2.0, 1.0]
score_range: [0.001, 0.999]
endpoints:
reset: POST /reset
step: POST /step
state: GET /state
tasks: GET /tasks
grader: POST /grader
baseline: POST /baseline
dashboard: GET /dashboard
curriculum: GET /curriculum
curriculum_reset: POST /curriculum/reset
adversarial_design: POST /adversarial/design
judge_config: POST /judge/config
features:
curriculum_tiers: [warmup, beginner, intermediate, advanced, expert]
adversarial_designer: true
llm_judge_personas: [junior, senior, principal]
phase_aware_rewards: true
repeat_command_penalty: true
multi_fault_scenarios: true
real_k8s_backend: optional
grpo_training_script: rl-agent/training/train_grpo.py
eval_script: rl-agent/eval.py
colab_notebook: notebooks/incident_commander_colab.ipynb
tags:
- openenv
- sre
- incident-response
- kubernetes
- reinforcement-learning
- curriculum
- adversarial
- llm-judge
- grpo