Inspiration

We were tired of CI failures that force engineers to stop context-switching, pull code locally, and burn hours running basic debug loops. When we saw Nebius Token Factory offer VM sandboxes with Git-like execution branching alongside NVIDIA Nemotron's high-reasoning models, we realized we could move software debugging from single-threaded, manual trial-and-error to parallel, autonomous execution.

What it does

How we built it

BranchGuard-AI turns red CI build logs into green, verified Pull Requests with zero human intervention:

Listens for failed GitHub Actions webhooks via a Django backend.

Prompts NVIDIA Nemotron 3 Ultra on Nebius Token Factory to generate multiple parallel fix hypotheses.

Spawns isolated Nebius Token Factory Sandboxes to execute and test all patch variations simultaneously.

Backtracks on failing branches, selects the green patch with the best performance metrics, and automatically submits a passing PR.

Challenges we ran into

How we built it Backend Orchestration: Built with Django, Celery, and Redis to handle incoming webhooks and async pipeline tasks.

Reasoning Engine: Connected to NVIDIA Nemotron models hosted on Nebius Token Factory for multi-file patch planning.

Sandbox Execution: Used the Nebius Token Factory Sandbox API and Python Contree SDK to fork runtime execution states, execute pytest suites inside VM-isolated environments, and capture resource metrics.

Accomplishments that we're proud of

Orchestrating concurrent execution streams across multiple sandbox branches without race conditions. We had to carefully map Nebius checkpoint IDs to isolated Celery task states to ensure thread-safe rollbacks and clean stdout/stderr log parsing.

What we learned

Building SWE agents isn't just about sending better prompts to LLMs—it's about execution environment design. Having fast, VM-isolated sandboxes with instant checkpointing fundamentally changes how aggressively an AI agent can test, fail, and self-correct.

What's next for BranchGuard

Adding automatic regression benchmarking (comparing RAM/CPU footprints across fix branches).

Built With

Share this project:

Updates

Submission history