Skip to content

Convergence Gate

The Convergence Gate takes raw output from the Sweep reviewer and drives it through a bounded correction loop, producing a clean result and a pending human-merge card rather than silently committing a diff.

The Gate operates in two modes set at the time a sweep run is triggered.

Mode A prepares a single sandboxed fix prompt based on the reviewer findings and surfaces it for human approval before anything executes. Nothing runs until you sign off on the proposed fix.

Mode B can auto-approve the fix prompt, wait for it to complete, and then continue the loop automatically. After the fix lands, Mode B enqueues a rebuild, re-runs the Sweep reviewer against the result, and evaluates the new findings before deciding whether to continue.

Mode B’s loop does not run indefinitely. It stops when any of the following is true:

  • The reviewer reports clean — no remaining findings.
  • The reviewer makes no progress across consecutive iterations — the same issues persist without reduction.
  • The findings oscillate — a fix in one area causes a regression in another, and the loop cannot converge.
  • The iteration count reaches the configured maximum bound.

When the loop exits for any reason, the Convergence Gate persists the result — the final diff, stop condition, and iteration history. Rather than automatically merging into your main branch, it surfaces a pending human-merge card in the Pipeline or Queue panel. You review the accumulated diff and decide whether to merge it yourself. Nothing reaches your main branch without that explicit action.