Answer stability round 1: 0 🔴, 4 🟡 (0 misread); name each template fault truly and pass the template to split
CI / tests (pull_request) Successful in 2m33s

This commit is contained in:
Lilleman
2026-11-20 10:46:19 +01:00
parent 3e8910f573
commit c39d23a1b3
5 changed files with 54 additions and 44 deletions
+16 -9
View File
@@ -170,19 +170,26 @@ class Planning(DoEpicTest):
found, _, _ = self.plan(fake)
self.assertEqual((found, fake.made("input")), ([issue("ABC-20", "backend")], ["The label that says where ABC-20 is worked, `repo:<name>`, `do-epic-claude` or `do-epic-human` (or the team's `backend`), or Enter alone to leave it waiting: "]))
def test_files_sub_tasks_in_the_teams_labels_and_summary_and_names_its_label_for_a_repo_typed_by_name(self) -> None:
with (self.home / ".claude-projects/do-epic/config.toml").open("a", encoding="utf-8") as config:
config.write('\n[label-repos]\nbackend = "api"\n')
text = (self.home / ".claude-projects/do-epic/config.toml").read_text(encoding="utf-8")
(self.home / ".claude-projects/do-epic/config.toml").write_text('sub-task-summary = "{label}: {Summary}"\n' + text, encoding="utf-8")
self.issues = [issue("ABC-20"), issue("ABC-21")]
def configure_team(self, *above: str) -> None:
"""Gives the config the team's label `backend` for api, and the settings in above."""
path = self.home / ".claude-projects/do-epic/config.toml"
path.write_text("".join(f"{line}\n" for line in above) + path.read_text(encoding="utf-8") + '\n[label-repos]\nbackend = "api"\n', encoding="utf-8")
def test_files_sub_tasks_under_the_teams_label_and_summary_template(self) -> None:
self.configure_team('sub-task-summary = "{label}: {Summary}"')
self.issues = [issue("ABC-20")]
parts = says({"parts": [{"repo": "api", "change": "Add the endpoint."}, {"repo": "web", "change": "Call it."}], "comment": "Delat per repo."})
fake = FakeEffects(claude=[parts, says({"parts": []}), says({"pick": "unclear", "question": "api or web?"})], inputs=["api", "backend"])
found, store, _ = self.plan(fake)
found, store, _ = self.plan(FakeEffects(claude=[parts]))
assert not isinstance(found, Failure | Limited), found
self.assertEqual([(each.summary, each.labels) for each in store.issues if each.parent == "ABC-20"], [("backend: Do ABC-20", ("backend",)), ("web: Do ABC-20", ("repo:web",))])
def test_records_the_teams_label_for_a_repo_the_human_types_by_name_and_names_it(self) -> None:
self.configure_team()
self.issues = [issue("ABC-20")]
fake = FakeEffects(claude=[says({"parts": []}), says({"pick": "unclear", "question": "api or web?"})], inputs=["api", "backend"])
found, _, _ = self.plan(fake)
self.assertEqual(found, [issue("ABC-20", "backend")])
self.assertIn("`api` is none of those labels; the repo api's label is `backend`\n", self.asked.getvalue())
self.assertEqual(next(each for each in store.issues if each.key == "ABC-21").labels, ("backend",))
def test_asks_the_human_for_the_label_of_an_issue_the_rule_leaves_unclear_until_one_is_typed(self) -> None:
self.issues = [issue("ABC-20")]