You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(loop): Max-Mode N-parallel coders — build N ways, judge, ship the best (v0.20.0) (#51)
The best-of-N judge (`_judge_candidates`) landed in #22; this wires the N-parallel
dispatch that feeds it. When `max_mode_n > 1`, a from-scratch build fans out N coders
on the same feature instead of one:
• create N throwaway candidate worktrees (`feat-<id>.c<k>`) off the same base
• dispatch the coder into ALL of them concurrently (asyncio.gather), each keeping
its own coder_timeout watchdog + finally teardown; return_exceptions so one
candidate timing out/erroring leaves an empty tree the judge skips, not a dead batch
• `_judge_candidates` picks the winning diff
• PROMOTE the winner into the canonical `feat-<id>` worktree / `feat/<id>` branch
(git worktree move + branch -m, uncommitted changes preserved) so the rest of the
lifecycle — CI-fail bounce, crash recovery, reaping — is unchanged; reap the losers
• all-empty → NoChangesError, which the loop escalates/blocks like a single coder
that produced nothing
Gating: only a FROM-SCRATCH build fans out. A carried-forward re-dispatch (CI bounce /
goal-fix / gate-fix — all signalled by _ci_feedback) FIXES the existing diff with one
coder, so it must not re-fan-out N. keep_wt fix retries stay single-candidate too.
Default off (max_mode_n=1). Bound N × max_concurrent to the host. Isolation stays on
git worktrees (container-use deferred to its own platform ADR).
Closes#21
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments