
DARA v2
Distributed Architecture Root-cause Agent
Production bugs cost hours of on-call attention before code is even touched. Engineers spend most of that time correlating stack traces to files, not fixing. DARA v2 asks: can an agent handle the triage → patch → validate loop, and hand off to a human reviewer when it is not confident?
- Role
- Solo — architecture, agent orchestration, sandbox runner, PR pipeline.
- Timeline
- 8 weeks · in development
- Source
- GitHub ↗
What was hard.
Grounding the LLM in the actual repo
Naive prompting hallucinated file paths that did not exist. Solved by building a Neo4j code graph + FAISS embeddings so the diagnosis agent could only cite real symbols.
Making patches provably safe
Every generated diff runs inside an ephemeral Docker sandbox against the failing test. If it does not turn red → green in ≤3 iterations, the agent stops and escalates instead of guessing.
Deciding when NOT to act
The hardest engineering was the confidence gate — refusing to open a PR when signal is weak. Better a silent agent than a noisy one.
How it fits together.
Event → diagnosis → patch → sandbox → PR
- ▸Redis coordinates agent handoffs and rate-limits LLM calls.
- ▸Every step is logged with a reversible trace so a human can replay any decision.
What shipped.
- —Vector search alone is not grounding — a code graph catches what embeddings miss.
- —Autonomous does not mean unattended. The refusal and escalation path is the product.
What the evidence supports.
Implemented capability
- ▸Event ingestion, LLM-based root-cause diagnosis grounded in a code graph + embeddings, and unified-diff patch generation.
- ▸Sandboxed patch validation: candidate diffs run against tests in an ephemeral Docker container, with bounded retry iterations.
- ▸Confidence gate that decides whether a patch proceeds or is escalated; policy-based escalation to a reviewer.
Benchmark evidence
A small benchmark of 8 fixtures: 5 auto-approved, 3 escalated or blocked by the gate. The test suite reports 371 passing, 2 skipped, 0 failures, at 53.60% statement coverage. This is early evidence that the gating path works on controlled fixtures — not evidence of production-grade reliability.
Where humans stay in the loop
Diagnosis, patch generation, sandbox validation and the gate decision are automated. Pull requests remain subject to reviewer approval, and low-confidence or policy-blocked cases are escalated rather than shipped. Fully unattended operation on real production incidents is an architectural goal, not something demonstrated yet.