Answer architecture round 2: 0 🔴, 1 🟡 (0 misread); the answer destinations and the help say the plan, and the notice of releases a plan outside the checkout hides prints once per chunk

This commit is contained in:
2026-11-16 14:54:27 +01:00
parent f58250d0ce
commit a60bfdbc1c
4 changed files with 14 additions and 9 deletions
+6 -1
View File
@@ -1173,7 +1173,8 @@ class RouteSources(unittest.TestCase):
with unittest.mock.patch.object(chunk_start, "session_open", return_value=True), unittest.mock.patch.object(chunk_start, "fetched_plan", return_value=plan) as fetched:
loop = a_loop(FakeEffects().effects())
self.assertEqual(chunk_start.chunk_start(loop), ("", plan))
fetched.assert_called_once_with(loop)
# An open session is no fresh chunk, so the human isn't told again of releases the plan cannot show.
fetched.assert_called_once_with(loop, False)
unreadable = Failure("git show origin/main:todo.md printed text that is not UTF-8")
for plan, said in ((DefaultPlan(plan_of(TODO.replace("| 4 | 2 | 3 |", "| x | 2 | 3 |")), NO_CUT), "routing on the project's rung: item 3's L 'x' is not a whole number from 1 to 4\n"), (DefaultPlan(unreadable, NO_CUT), f"routing on the project's rung: {unreadable.reason}\n"), (Failure("no origin remote"), "routing on the project's rung: no origin remote\n")):
with self.subTest(said=said):
@@ -1218,6 +1219,10 @@ class RouteSources(unittest.TestCase):
held = chunk_start.fetched_plan(standing)
self.assertEqual((held.plan, held.cut.todos_since, held.cut.changelog), (plan_of(TODO), [], ""), "the plan as it stands, whatever git answers")
self.assertEqual(stderr.getvalue(), f"{STAMP} {UNSEEN_RELEASES}\n", "a release review loop-claude cannot call due is never skipped silently")
quiet = a_loop(FakeEffects(git=["origin\n", "origin/main\n", unread, unread, unread, unread]).effects(), root=root, paths=paths.paths_from(folder.parents[1]))
with contextlib.redirect_stderr(io.StringIO()) as stderr:
chunk_start.fetched_plan(quiet, announce=False)
self.assertEqual(stderr.getvalue(), "", "said once per chunk, as it starts")
config.unlink()
with contextlib.redirect_stderr(io.StringIO()) as stderr:
self.assertIn("no config names the checkout", chunk_start.scored_plan(chunk_start.fetched_plan(loop), loop.effects).reason)