Inspiration

Coding agents often declare victory without evidence. They inspect a codebase, make an edit, and tell the user the bug is fixed. When the user runs the tests, they fail.

I wanted an agent where "passed" means the real test suite returned green in that exact session, nothing less. So I built Shipwright: an autonomous coding loop that is honest by construction, backed by a live console and reproducible proof runs that anyone can verify with one command.

What it does

Shipwright takes a Python project with failing tests and a plain-language goal. It inspects the files, runs the test suite, reads the failing code, makes the smallest targeted edit, and re-runs the tests until they pass. Then it reports what it changed.

Key design choices:

  • Honesty rule: a run only reports status passed if run_tests returned passed=true during that session. A model claim is never enough.
  • Live console: a streaming web interface (uvicorn shipwright.web:app) that renders tool calls, file reads, unified diffs, and test output as the agent works. Red test runs flip to green live on screen.
  • Reproducible proof: python scripts/run_proof.py recreates four isolated broken projects, runs the unchanged agent loop, and logs wall times and step counts to proof_cases/results.json.
Scenario Starting failure Steps Agent time Tests before Tests after
Logic error Discount adds instead of subtracts the percentage 6 5.85 s red, 1 failed green, 2 passed
Off-by-one Slice omits a requested item 6 5.03 s red, 2 failed green, 2 passed
Missing edge cases Median wrong on even lengths; empty input crashes 6 4.80 s red, 2 failed / 1 passed green, 3 passed
Import bug Invalid legacy import fails test collection 7 10.21 s red, collection error green, 1 passed

How we built it

  • Model: NVIDIA Nemotron 3 Super 120B (nvidia/nemotron-3-super-120b-a12b), an open-weights model served through Nebius Token Factory's OpenAI-compatible API. I rely on its native tool calling across four tools: list_files, read_file, write_file, and run_tests.
  • Model swap: switching to Nemotron 3 Nano (nvidia/nemotron-3-nano-30b-a3b) is a single --model flag for a cheaper, faster repair loop.
  • Agent loop: a lightweight, auditable Python loop (shipwright/agent.py) that dispatches tool calls and feeds results back to the model.
  • Sandbox: shipwright/sandbox.py confines every file operation to the project root and enforces test-run timeouts. Path escapes fail closed.

Challenges we ran into

The biggest challenge was keeping the agent honest without making it fragile. Early agent loops would declare victory after a single edit without re-running the test suite, or get stuck re-reading the same file. Enforcing that status passed strictly requires an observed green run_tests call inside the active session solved the false-positive problem. Confining all reads and writes inside the project sandbox prevented the model from mutating outside dependencies.

Accomplishments that we're proud of

  • A verified red-to-green repair loop running live against Nebius Token Factory.
  • A dark terminal-glass streaming UI that makes agent reasoning and diffs inspectable in real time.
  • A public proof harness where every benchmark claim is independently reproducible by running a single script.

What we learned

Tool-calling coding agents are only as reliable as the verification harness outside the model. The model should propose edits, but the test suite must be the judge.

What's next for Shipwright

  • Multi-file repair planning across complex dependency graphs
  • Direct integration with GitHub Actions to repair failing pull requests automatically.
  • Running long-horizon repair jobs on Nebius Serverless Jobs.

Built With

Share this project:

Updates

Submission history