-
Notifications
You must be signed in to change notification settings - Fork 0
Repair Loop
Signal, not vibes: each stage narrows the suspect set with evidence, and selection is by execution, not by asking the model which patch looks right.
failing tests → extract signals → localize → sample K patches
→ select by running the real suite → blast-radius gate → commit
- Signals — traceback paths, exception types, failing-test identity, plus a flake-tolerance pass (a test that also fails on the unpatched baseline is evidence, not a verdict).
-
Localization — evidence-ranked suspects: traceback frames → symbol
resolution → call-graph blast radius (CIE-Integration when CIE is
present; the built-in
ToolBackends otherwise). Long functions get a second pass at statement granularity — Statement-Level-Graph. - K sampled attempts — K independent patch attempts run in parallel (adaptive, rate-limit-aware worker pool).
-
Selection by execution — each candidate is applied, the real
suite is run, the tree is restored. The winner is empirically better,
not the model's favorite. (
sandbox.py::_purge_pycacheexists because a write→retest cycle could otherwise evaluate a stale.pycand silently corrupt this selection — root-caused and fixed; see req-parallel-execution.) - Blast-radius gate — a static check that rejects a winning patch if it changes or removes a function/method signature while a caller outside the patched file still depends on it — the rejection is fed back into the next round's prompt rather than dropped.
- Commit — each accepted edit is auto-committed with a descriptive message (req-auto-commit-messages); any round that makes things worse is reverted.
Every run's outcome is one of 7 checkpointed verdicts:
passed / failed / partial / timeout / lint_error / crashed /
skipped — plus the full phase-by-phase history
(Checkpointing-and-Resumability).
- Local — direct subprocess execution with per-command timeouts.
-
Docker — per-project persistent container
(req-cli-ci-native); forge degrades gracefully with
FORGE_DISABLE_DOCKER_TESTS=1. - Bootstrap-Gate — before any of this runs against a cold clone, the environment is proven capable of running at least one test.
Execution-guided selection and critique-gated repairs trace to SWE-agent's agent-computer interface work (arXiv:2405.15793), Agentless's localize-repair decompose (arXiv:2408.03310), and self-refine loops (arXiv:2303.17651) — the full survey with what forge adopts and what it deliberately does not is in req-execution-guided-repair and req-critic-self-verification-gate.
atomic-forge — an agentic generate → test → repair loop with a machine-checked task contract, crash-safe checkpointing, and execution-selected repairs. BSL 1.1 licensed.
Start here
Workflows
Reference
Background
Requirements (R1–R16)
- Requirements-and-Roadmap
- Agent-Computer-Interface
- Critic-Verification-Gate
- Planner-Executor-Split
- Repo-Scale-Context
- Auto-Commit-Messages
- Persistent-Sandbox
- Multi-Channel-Intake
- Review-Comment-Driven-Fix
- Zero-Friction-Integration
- Self-Review-Issue-Resolution
- Enterprise-Scale-Indexing
- CLI-CI-Native
- Parallel-Execution
- Execution-Guided-Repair
- Data-Privacy-No-Training
- Environment-Bootstrap