Answer stability round 1: 1 🔴, 4 🟡 (0 misread); check a new chunk's Touches against every held item, keep a stopped chunk's items, test the fetch and fold the slot loop back

This commit is contained in:
2026-11-16 12:46:07 +01:00
parent fbd1b5e99d
commit fa9d487afd
8 changed files with 148 additions and 58 deletions
+3 -4
View File
@@ -67,13 +67,12 @@ def chunk_start(loop: Loop) -> tuple[str, typing.Callable[[], Item | None]]:
def chunk_facts(loop: Loop) -> str:
"""What `chunk-preflight --worktree` printed at the checkout root, for a fresh worker's prompt, or why it could not run. The chunk of a window named for an item starts from that item, and the facts end with the items the project's other running chunks hold."""
"""What `chunk-preflight --worktree` printed at the checkout root, for a fresh worker's prompt, or why it could not run. The chunk of a window named for an item starts from that item, and either ends with the items the project's other chunks hold."""
item = item_of(loop.window.name)
done = loop.effects.python([str(loop.launcher.with_name("chunk-preflight")), "--worktree", *([] if item is None else [ITEM, str(item)])], loop.root)
if done.returncode:
return prompts.preflight_failed(done.stderr.strip() or f"it exited {done.returncode}")
facts = prompts.preflight_failed(done.stderr.strip() or f"it exited {done.returncode}") if done.returncode else prompts.preflight_facts(done.stdout.strip())
held = held_beside(loop.window.name, loop.root, loop.paths, loop.effects)
return prompts.preflight_facts(done.stdout.strip()) + (prompts.held_by_others(held) if held else "")
return facts + (prompts.held_by_others(held) if held else "")
def fetched_plan(loop: Loop) -> DefaultPlan | Failure: