Record do-epic's repo picks and sub-task summaries in the team's own spelling
CI / tests (pull_request) Failing after 2m33s

This commit is contained in:
Lilleman
2026-11-20 09:10:55 +01:00
parent e9e11f10a0
commit 15c978b708
9 changed files with 130 additions and 23 deletions
+15 -1
View File
@@ -9,7 +9,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from do_epic.test_repo_pick import Claude, says
from do_epic.backend.protocol import EpicIssue
from failure import Failure
from do_epic.split import finished, is_split, Split, split, SPLIT_LABEL, SPLIT_SCHEMA
from do_epic.split import finished, is_split, Split, split, SPLIT_LABEL, SPLIT_SCHEMA, task_summary
from claude_code.reply import Limited
from do_epic.backend.fake import MemoryEpic
from model_routing.ladder import Rung
@@ -61,6 +61,20 @@ class Split_(unittest.TestCase):
self.assertEqual(self.issue().labels, ("api", SPLIT_LABEL))
self.assertEqual(self.store.comments, {})
def test_files_each_sub_task_as_the_teams_template_and_label_say(self) -> None:
team = {"twu-4": "web", "core-4": "api"}
done = split(self.store, self.issue(), team, False, RULE, "Swedish", (), RUNG, says(TWO), "/rules", "{label}: {Summary}")
self.assertEqual((done, [(task.summary, task.labels) for task in self.tasks()]), (Split(("api", "web"), tuple(task.key for task in self.tasks())), [("core-4: Count the runs.", ("core-4",)), ("twu-4: Count the runs.", ("twu-4",))]))
def test_a_template_names_the_repo_where_the_table_does_not(self) -> None:
self.assertEqual(task_summary("api", "bygg stöd", {}, "{label}: {Summary}"), "api: Bygg stöd")
def test_a_template_with_the_summary_as_it_is_leaves_its_first_letter(self) -> None:
self.assertEqual((task_summary("api", "bygg stöd", {"core": "api"}, "{Summary} ({label})"), task_summary("api", "", {}, "{Summary}")), ("Bygg stöd (core)", ""))
def test_without_a_template_the_summary_is_the_repo_in_brackets_and_the_item_summary(self) -> None:
self.assertEqual(task_summary("api", "bygg stöd", {"core": "api"}, None), "[api] bygg stöd")
def test_an_item_a_person_filed_a_sub_task_under_is_left_alone_without_asking_claude(self) -> None:
self.store.issues.append(EpicIssue("ABC-90", "twu-4: Count them.", "", ("twu-4",), None, "To Do", False, self.key))
claude = says(TWO)