Commit 48ac4d6
fix(flow): keep the batch sweep alive across an iterate-plan re-open (#105)
In a multi-bundle flow, signing a bundle off as iterate-plan left it stuck at
UNPLANNED: the attempt was archived to iteration-v1/, but the re-plan + rebuild never
ran. Single-issue flow() is fine (its for-max_iters loop re-plans the re-opened
bundle); only the batch `_drive_and_act` loop was affected.
Root cause: decisions are recorded apply_now=False, so an iterate-plan becomes
ITERATE_PLAN and the archive→UNPLANNED happens in the NEXT pass's build-all — but the
plan pre-pass runs before the archive, so that pass ends with the bundle freshly
UNPLANNED and nothing awaiting sign-off. `if not pending: break` then exited before the
pass that would re-plan it.
Break only when the band made NO progress this pass: snapshot bundle states before
build-all and, when nothing is pending, `continue` if any state changed (e.g. the
iterate-plan re-open) and `break` only if all states held (genuinely terminal, or the
planner declined an UNPLANNED bundle). Bounded by max_passes.
Test: test_batch_iterate_plan_then_complete — a batch member iterate-plans, then both
reach COMPLETE with the first attempt preserved in iteration-v1/. Full suite: 170 OK.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Eduard Ralph <15236434+eduralph@users.noreply.github.com>1 parent 870e5d2 commit 48ac4d6
2 files changed
Lines changed: 37 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
| |||
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
372 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
373 | 381 | | |
374 | 382 | | |
375 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
193 | 221 | | |
194 | 222 | | |
195 | 223 | | |
| |||
0 commit comments