Skip to main content

CIDRA

Continuous Integration Debugging and Repair Agent.

A LangGraph agent that triggers on CI failure, diagnoses the root cause, reproduces it in a hardened Docker sandbox, and only claims a fix it has verified green.

The interesting claim is not "AI fixes CI" — plenty of tools say that. It is that this one is measured: a fixture corpus with hand-written ground truth, an adversarial sandbox test set, and a refusal path for failures it cannot honestly repair.

Status

Work in progress, built in phases (see docs/3_phases.md).

Phase State
0 — Skeleton + 18-node graph done
1 — Fixture corpus done (logs are local; real CI logs pending)
2 — Log ingestion isolation done; GitHub API fetch pending
3 — LLM root-cause analysis done — 7/7 category accuracy
4 — Docker sandbox done — 7/7 fixtures reproduce red
5 — Fix + verify loop done
6 — Output + safety done
7 — Live webhook / GitHub Action planned (Action integration)
8+ — Extensibility & Enterprise features in progress

What works today

Running the full graph against real fixtures, on real Docker:

Fixture Class Outcome
F-01 missing_dependency verified_fix — red, patched, green
F-04 flaky_test flaky_detected — 0 fix attempts
N-01 out of scope diagnosis_only — 0 LLM calls, no fix claimed
bad patch — verified: false — never claims an unapplied fix

Flaky tests get a first-class terminal outcome rather than being forced through a fix-verify cycle they can never satisfy.

Safety

The sandbox is the highest blast-radius component, so its rules are enforced in cidra/sandbox/runner.py rather than left to callers — there is no privileged parameter, no network parameter, and no way to override the resource caps from a call site. Full threat model in docs/6_sandbox_spec.md.

Verified by test_sandbox.py (15 checks): no network during test/verify, network only during dependency install, no Docker socket, no host secrets in the container, non-root, timeouts enforced, fork bombs bounded by pids_limit, containers always removed.

LLM output is data, never code. The model returns a unified diff, applied with git apply. Test commands are CIDRA-authored constants.

Installation & Setup

CIDRA is distributed as a standard Python package. You can run it locally as a CLI debugging assistant, or plug it into your GitHub Actions for autonomous CI repairs.

1. Local CLI Dev Tool

Diagnose and repair your code locally before pushing to CI.

# Install the package
pip install cidra

# Configure your LLM Provider key (e.g. Gemini, OpenAI, Anthropic)
export CIDRA_API_KEY="your-api-key"

# Ensure the local Docker daemon is running, then build the sandbox base image:
docker build -t cidra-sandbox:base -f cidra/sandbox/Dockerfile cidra/sandbox

# Run CIDRA against your local codebase
cidra fix

2. GitHub Actions Integration (Coming Soon)

CIDRA can be plugged natively into your .github/workflows/. Because it runs inside your runner, you pay zero infrastructure costs.

jobs:
  test-and-repair:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run CIDRA
        uses: cidra-ai/cidra-action@v1
        env:
          CIDRA_API_KEY: ${{ secrets.CIDRA_API_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Note: To protect your API keys, CIDRA strictly isolates the untrusted checkout environment from the orchestration layer.

Developing CIDRA

To develop the agent itself:

pip install -e ".[dev]"
cp .env.example .env

# Run the test suite
pytest tests/
python eval/run_eval.py --tier 1

Docs

1_project_understanding.md The original brief
2_scope_and_decisions.md What's in, what's out, and why
3_phases.md Build order
4_architecture.md Graph topology, state, trust boundaries
5_fixtures.md Fixture corpus + eval methodology
6_sandbox_spec.md Threat model and container rules

Metadata

Release files for cidra 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cidra 0.1.0
File Size Uploaded
cidra-0.1.0.tar.gz 51.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cidra 0.1.0
File Interpreter ABI Platform
cidra-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 113.8 kB

Release files / cidra-0.1.0.tar.gz

Download URL cidra-0.1.0.tar.gz
Size 51.3 kB
Tags Source
SHA-256 checksum
How to use checksums
048ae6719698383a574b5a6fcb6064870799216058ff896bbafea7ab6540c4f3
BLAKE2b-256 checksum
How to use checksums
2fbf71adee24a84a5a2d5b9d1c02e628c95ee249c284c101405fb9901ccb1082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / cidra-0.1.0-py3-none-any.whl

Download URL cidra-0.1.0-py3-none-any.whl
Size 62.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3677ac7fb75540282ae8a34ba94515156e98be928236b9d2defce280fa7cff60
BLAKE2b-256 checksum
How to use checksums
182d9e3ffe7f565fbe958f9baba8106d5abfb302cb749230b556f3f8171f2fbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page