Answer architecture round 1: 0 🔴, 4 🟡 (0 misread); chunks_to_start and the epic's folder take the resolved paths; branch_summaries and reviewer_breaches wait for item 300
CI / tests (pull_request) Successful in 5m19s

This commit is contained in:
2026-12-03 19:45:15 +01:00
parent 55f87fb34e
commit a014e75101
15 changed files with 72 additions and 67 deletions
+12 -9
View File
@@ -36,12 +36,16 @@ def scored(key: str, moves: str, *labels: str, blockers: tuple[str, ...] = (), b
class Planning(DoEpicTest):
def setUp(self) -> None:
super().setUp()
self.folder = self.home / ".local/state/build-release/do-epic/ABC-12"
def plan(self, fake: FakeEffects) -> tuple[list[EpicIssue] | Failure | Limited, MemoryEpic, str]:
"""What planning answers for self.issues, the store it changed and what it printed on stdout. self.asked holds what it asked the human, on stderr."""
config = load(self.home, {})
assert not isinstance(config, Failure), config
store = MemoryEpic("ABC-12", list(self.issues))
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, fake.effects()) # type: ignore[arg-type]
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, self.folder, fake.effects()) # type: ignore[arg-type]
out, self.asked = io.StringIO(), io.StringIO()
with contextlib.redirect_stdout(out), contextlib.redirect_stderr(self.asked):
read = store.read()
@@ -152,11 +156,10 @@ class Planning(DoEpicTest):
folders.append(cwd)
return effects.claude(args, cwd, stdin) # type: ignore[arg-type]
config = load(self.home, {})
epic = planning.Planned("ABC-12", config, MemoryEpic("ABC-12", list(self.issues)), EpicRecord(Description("")), self.home, {}, dataclasses.replace(effects, claude=claude)) # type: ignore[arg-type]
epic = planning.Planned("ABC-12", config, MemoryEpic("ABC-12", list(self.issues)), EpicRecord(Description("")), self.home, {}, self.folder, dataclasses.replace(effects, claude=claude)) # type: ignore[arg-type]
with contextlib.redirect_stdout(io.StringIO()):
planning.planned(epic, list(self.issues))
folder = self.home / ".local" / "state" / "build-release" / "do-epic" / "ABC-12"
self.assertEqual((folders, folder.is_dir()), ([str(folder)] * 2, True))
self.assertEqual((folders, self.folder.is_dir()), ([str(self.folder)] * 2, True))
def test_a_model_off_the_routing_ladder_has_no_rung(self) -> None:
found = planning.planning_rung("claude-nope-1")
@@ -379,7 +382,7 @@ class Planning(DoEpicTest):
self.description = RANKED
self.issues = [scored("ABC-20", "epic 1 by 2", "do-epic-claude", by_loop=False), issue("ABC-21", "do-epic-claude")]
# An earlier run made the folder the scoring runs in.
(self.home / ".local/state/build-release/do-epic/ABC-12").mkdir(parents=True, exist_ok=True)
self.folder.mkdir(parents=True, exist_ok=True)
fake = FakeEffects(claude=[says(ANSWER)])
found, store, out = self.plan(fake)
assert not isinstance(found, Failure | Limited), found
@@ -447,10 +450,10 @@ class Planning(DoEpicTest):
folders.append(cwd)
return effects.claude(args, cwd, stdin) # type: ignore[arg-type]
config = load(self.home, {})
epic = planning.Planned("ABC-12", config, MemoryEpic("ABC-12", list(self.issues)), EpicRecord(Description(RANKED)), self.home, {}, dataclasses.replace(effects, claude=claude)) # type: ignore[arg-type]
epic = planning.Planned("ABC-12", config, MemoryEpic("ABC-12", list(self.issues)), EpicRecord(Description(RANKED)), self.home, {}, self.folder, dataclasses.replace(effects, claude=claude)) # type: ignore[arg-type]
with contextlib.redirect_stdout(io.StringIO()):
planning.planned(epic, list(self.issues))
self.assertEqual(folders, [str(self.home / ".local" / "state" / "build-release" / "do-epic" / "ABC-12")] * 2)
self.assertEqual(folders, [str(self.folder)] * 2)
self.rule()
self.description = RANKED
@@ -469,7 +472,7 @@ class Planning(DoEpicTest):
out = io.StringIO()
config = load(self.home, {})
assert not isinstance(config, Failure), config
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, FakeEffects(claude=[says(ANSWER)]).effects()) # type: ignore[arg-type]
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, self.folder, FakeEffects(claude=[says(ANSWER)]).effects()) # type: ignore[arg-type]
with contextlib.redirect_stdout(out):
found, stopped = planning.scored(epic, list(self.issues))
self.assertEqual((found, stopped, out.getvalue()), (self.issues, None, "<1790000000> scoring ABC-20\n<1790000000> ABC-20 is not scored: Jira answered 503\n"))
@@ -520,7 +523,7 @@ class Planning(DoEpicTest):
"""What planning answers for self.issues on a store that doesn't read as MemoryEpic does."""
config = load(self.home, {})
assert not isinstance(config, Failure), config
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, fake.effects()) # type: ignore[arg-type]
epic = planning.Planned("ABC-12", config, store, EpicRecord(Description(self.description)), self.home, {}, self.folder, fake.effects()) # type: ignore[arg-type]
with contextlib.redirect_stdout(io.StringIO()):
return planning.planned(epic, list(self.issues))