Answer architecture round 1: 2 🔴, 8 🟡 (0 misread); split task-bench's benched into phases and its table into one column list, parse each stream once, move do-epic's parking out with pure move and news decisions, share the round summaries, rename scoring_due, and file the version question as item 517
CI / tests (pull_request) Successful in 5m2s

This commit is contained in:
2026-11-23 01:20:55 +01:00
parent 21200cb698
commit 0bf87b736e
29 changed files with 678 additions and 368 deletions
+35 -4
View File
@@ -12,7 +12,7 @@ import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from do_epic import chunk_prompt, main, planning
from do_epic import chunk_prompt, epic_run, main, planning
from chunk_driver.chunk_run import ChunkRun
from project_config.doubles import configured
from do_epic.config import DoEpicConfig
@@ -86,11 +86,11 @@ class DoEpicTest(unittest.TestCase):
self.issues = [issue("ABC-20", "repo:api")]
return folder
def epic_run(self, fake: FakeEffects, env: dict[str, str] | None = None) -> main.EpicRun:
def epic_run(self, fake: FakeEffects, env: dict[str, str] | None = None) -> epic_run.EpicRun:
config = main.load(self.home)
assert not isinstance(config, Failure)
store, record = self.backend(config, "ABC-12")
return main.EpicRun("ABC-12", config, store, record, paths_from(self.home), env or {}, pathlib.Path("/b/do-epic"), fake.effects())
return epic_run.EpicRun("ABC-12", config, store, record, paths_from(self.home), env or {}, pathlib.Path("/b/do-epic"), fake.effects())
def run_main(self, argv: list[str], fake: FakeEffects, env: dict[str, str] | None = None) -> tuple[int, str, str]:
out, err = io.StringIO(), io.StringIO()
@@ -1237,6 +1237,37 @@ class AnEpicsWorkingBranch(DoEpicTest):
self.assertTrue(stop.reason.endswith("once it has that status in Jira, run `do-epic ABC-12` to start the chunks it blocks"), stop.reason)
class TheMoveOfAFinishedChunksIssue(unittest.TestCase):
def move(self, landed: main.Landed, automated: bool, merged: str | None = None, opened: str | None = None, finishing: bool = False) -> main.Move:
return main.issue_move(landed, automated, merged, opened, finishing)
def test_the_epics_finishing_has_no_issue_to_move(self) -> None:
for automated in (False, True):
self.assertEqual(self.move(main.Landed.NOWHERE, automated, "Release Ready", "In Review", finishing=True), main.Move(main.How.LEFT))
def test_a_humans_task_is_left_where_the_automation_moves_issues_and_done_otherwise(self) -> None:
self.assertEqual(self.move(main.Landed.WITH_A_HUMAN, True, "Release Ready"), main.Move(main.How.LEFT))
self.assertEqual(self.move(main.Landed.WITH_A_HUMAN, False, "Release Ready"), main.Move(main.How.TO_DONE))
def test_a_chunk_without_a_repo_moves_to_done(self) -> None:
for automated in (False, True):
self.assertEqual(self.move(main.Landed.NOWHERE, automated, "Release Ready", "In Review"), main.Move(main.How.TO_DONE))
def test_work_on_the_default_branch_awaits_the_automation_or_moves_to_done(self) -> None:
self.assertEqual(self.move(main.Landed.ON_DEFAULT_BRANCH, True, "Release Ready", "In Review"), main.Move(main.How.AWAITED))
self.assertEqual(self.move(main.Landed.ON_DEFAULT_BRANCH, False, "Release Ready", "In Review"), main.Move(main.How.TO_DONE))
def test_work_on_the_epics_branch_moves_to_the_merged_status_through_the_open_one_where_named(self) -> None:
for automated in (False, True):
self.assertEqual(self.move(main.Landed.ON_EPIC_BRANCH, automated, "Release Ready", "In Review"), main.Move(main.How.TO_STATUS, "Release Ready", "In Review"))
self.assertEqual(self.move(main.Landed.ON_EPIC_BRANCH, automated, "Release Ready"), main.Move(main.How.TO_STATUS, "Release Ready"))
def test_work_on_the_epics_branch_with_no_merged_status_is_stuck_under_automation_and_done_otherwise(self) -> None:
self.assertEqual(self.move(main.Landed.ON_EPIC_BRANCH, True, None, "In Review"), main.Move(main.How.STUCK))
self.assertEqual(self.move(main.Landed.ON_EPIC_BRANCH, True, "", "In Review"), main.Move(main.How.STUCK))
self.assertEqual(self.move(main.Landed.ON_EPIC_BRANCH, False, None, "In Review"), main.Move(main.How.TO_DONE))
class TheStatus(DoEpicTest):
def test_prints_what_each_open_issue_does_and_starts_nothing(self) -> None:
self.issues = [issue("ABC-21", "repo:api"), issue("ABC-24", "repo:api"), issue("ABC-27")]
@@ -1369,7 +1400,7 @@ class TheDryRun(DoEpicTest):
self.issues = [dataclasses.replace(issue(key, "do-epic-claude"), scores={"L": 1, "E": 1, "I": 1, "S": 1}) for key in ("ABC-20", "ABC-21")]
out = io.StringIO()
with contextlib.redirect_stdout(out):
main.chunks_started(self.epic_run(FakeEffects(on_terminal=False)), self.issues, None)
epic_run.chunks_started(self.epic_run(FakeEffects(on_terminal=False)), self.issues, None)
self.assertIn("the issues of ABC-12 start in Jira's backlog order, since they cannot be put in order of score: the epic ABC-12's description states `Score = ...` 0 times under ## Scoring", out.getvalue())
self.description = DESCRIPTION.replace("Ship the import.", "1. **Achieve:** Ship the import.") + "\n## Scoring\n`Score = V`\n"
self.issues = self.issues[:1]