Answer architecture round 1: 1 🔴, 21 🟡 (0 misread); skip the routing call where no development clone exists, name the judge's rules the setup's, record two accepted trade-offs, and update stale plan paths

This commit is contained in:
2026-12-04 10:19:24 +01:00
parent b568445ed8
commit 9450017fd3
15 changed files with 53 additions and 33 deletions
+4 -1
View File
@@ -55,7 +55,7 @@ def new_calls(root: pathlib.Path, paths: Paths, env: Mapping[str, str], effects:
def raise_calls(root: pathlib.Path, new: list[Call], rung: Rung, loop: Loop) -> Stop | None:
"""Puts the calls to the human through a claude in this setup's development clone, where the routing decision is changed. Off a terminal they are only said, and stay in the figures, raised at the next measurement on a terminal."""
"""Puts the calls to the human through a claude in this setup's development clone, where the routing decision is changed. Off a terminal, or on a machine without that clone, they are only said, and stay in the figures, raised at the next measurement that has both."""
bullets = "".join(f"- {call.sentence()}\n" for call in new)
question = f"build-release's routing figures call for a routing change:\n{bullets}The figures: {root / archive.FIGURES}"
say(f"\n{question}", loop.effects)
@@ -63,6 +63,9 @@ def raise_calls(root: pathlib.Path, new: list[Call], rung: Rung, loop: Loop) ->
if not loop.effects.on_terminal():
say("Not on a terminal: the calls are raised again at the next measurement.", loop.effects)
return None
if not loop.paths.config_clone.is_dir():
say(f"No development clone at {loop.paths.config_clone}: the calls are raised again at the next measurement.", loop.effects)
return None
prompt = f"Put these calls for a routing change from build-release's figures to the human, and don't change anything until they answer:\n{bullets}The figures are in {root / archive.FIGURES}. The ladder, its steps and the delegation rule are docs/decisions.md → `routing:`, and a change to them is the human's. Record what they decide in this checkout, the development clone, as the setup's CLAUDE.md says; the next chunk of this repo files the plan item for these calls."
unstarted = hand_over(ClaudeCommand(claude_args(rung, [prompt]), str(loop.paths.config_clone), {}), loop.effects)
if unstarted:
@@ -34,6 +34,7 @@ class RoutingCheck(unittest.TestCase):
self.addCleanup(shutil.rmtree, self.home)
self.root = self.home / "archive"
self.paths = paths.paths_from(self.home, {})
self.paths.config_clone.mkdir(parents=True)
self.session = session.session_named("A log build-release", self.paths.claude_code_transcripts)
def loop(self, fake):
@@ -116,6 +117,18 @@ class RoutingCheck(unittest.TestCase):
self.assertIsNone(state.mark_measured(self.root, 0))
self.assertIn("Not on a terminal", self.check(FakeEffects(on_terminal=False, git=[UNREAD] * 3))[1])
def test_goes_on_where_the_machine_has_no_development_clone_and_raises_the_call_again_next_time(self):
"""A release's clone holds only a release, so a machine without `~/code/dev-factory` has nowhere to change the routing decision."""
self.chunks(5, 4)
shutil.rmtree(self.paths.config_clone)
fake = FakeEffects(on_terminal_claude=[0], git=[UNREAD] * 3)
stop, said = self.check(fake)
self.assertIsNone(stop)
self.assertEqual(fake.made("claude_on_terminal"), [])
self.assertIn(f"No development clone at {self.paths.config_clone}: the calls are raised again at the next measurement.", said)
self.assertIn("Explore subagents' reports took more of the worker's context", (self.root / "routing-figures.md").read_text())
self.assertFalse((self.root / "routing-calls-raised.md").exists())
def test_leaves_the_measuring_to_a_loop_holding_the_lock(self):
self.chunks(5, 4)
with archive.locked(self.root):
+1 -1
View File
@@ -38,7 +38,7 @@ class ExitContract(unittest.TestCase):
def test_every_exit_1_stop_has_its_clause_in_help(self):
read, git, premises_ = "a transcript cannot be read or archived", "git cannot start or finds no checkout", "no config names the checkout, its config cannot be read, or the goals file holds no premises"
models_ = "the models file cannot be read or written"
names = (*records.RECORD_FILES, records.HUMAN_RULE_NAMES[0], f"{records.HUMAN_RULE_NAMES[1]}*.md", records.HUMAN_RULE_NAMES[2])
names = (*records.RECORD_FILES, records.SETUP_RULE_NAMES[0], f"{records.SETUP_RULE_NAMES[1]}*.md", records.SETUP_RULE_NAMES[2])
unreadable = f"the goals file, or {', '.join(names[:-1])} or {names[-1]} where they exist, cannot be read or is not UTF-8"
# Every Stop whose code is not a literal 0, 2 or 130, in source order: path, function, code, start of reason, its --help clause.
clauses = [