Answer stability round 1: 0 🔴, 4 🟡 (0 misread); make the landed move only where its transition leads to an unblocking status, read the issue's status first, move parents after planning, and list do_epic's files one per bullet

This commit is contained in:
2026-11-21 00:31:37 +01:00
parent e8cd651bb8
commit 3273852b58
12 changed files with 123 additions and 46 deletions
+14 -2
View File
@@ -200,13 +200,25 @@ class EpicStoreContract:
store = self.new_store()
child = self.filed(store, store.epic_key, "Count the runs.")
task = self.filed(store, child, "Count them in the api.")
self.assertEqual([store.move_issue_by(task, self.transition), store.move_issue_by(child, self.transition)], ["Done", "Done"])
self.assertEqual([store.move_issue_by(task, self.transition, ("Done",)), store.move_issue_by(child, self.transition, ("Done",))], ["Done", "Done"])
self.assertEqual({issue.key: (issue.status, issue.done) for issue in self.issues(store)}, {child: ("Done", True), task: ("Done", True)})
def test_makes_no_move_by_a_transition_that_leads_to_another_status_than_those_asked_for(self) -> None:
store = self.new_store()
child = self.filed(store, store.epic_key, "Count the runs.")
self.assertIsInstance(store.move_issue_by(child, self.transition, ("Release Ready",)), Failure)
self.assertEqual([(issue.status, issue.done) for issue in self.issues(store)], [("To Do", False)])
def test_leaves_an_issue_already_at_a_status_asked_for_where_it_is(self) -> None:
store = self.new_store()
child = self.filed(store, store.epic_key, "Count the runs.")
self.assertEqual(store.move_issue_by(child, self.transition, ("Done",)), "Done")
self.assertEqual(store.move_issue_by(child, "Release Ready", ("done",)), "Done")
def test_refuses_to_move_an_issue_outside_the_epic_by_a_transition(self) -> None:
store = self.new_store()
self.filed(store, store.epic_key, "Count the runs.")
self.assertIsInstance(store.move_issue_by("ZZZ-1", self.transition), Failure)
self.assertIsInstance(store.move_issue_by("ZZZ-1", self.transition, ("Done",)), Failure)
self.assertEqual([issue.status for issue in self.issues(store)], ["To Do"])
def test_finishes_a_sub_task_of_a_child_issue_and_leaves_its_parent_open(self) -> None: