Kill the mutants of the merged-chunk cleanup
CI / tests (pull_request) Has been cancelled

This commit is contained in:
2026-12-03 13:03:37 +01:00
parent 5a31cc9607
commit 0ea7c13673
3 changed files with 25 additions and 2 deletions
+7 -2
View File
@@ -266,7 +266,7 @@ def chunk_run(key: str, epic: EpicRun) -> Stop:
if isinstance(news, Stop):
return news
if isinstance(news, Merged):
return handed_on(key, epic, Landed.ON_EPIC_BRANCH if based is not None else Landed.ON_DEFAULT_BRANCH)
return handed_on(key, epic, landed_in(repo, based))
run = dataclasses.replace(run, cycle_number=run.cycle_number + 1)
cycle = next_cycle(run, loop, repo is not None, epic, news)
if isinstance(cycle, Stop):
@@ -284,7 +284,7 @@ def chunk_run(key: str, epic: EpicRun) -> Stop:
news = parked_through(repo, loop, epic, told=news, finished=isinstance(concluded.verdict, Finished), based=based) if repo is not None else ""
# A chunk that was parked has work again, whatever the judge ruled before its pull request passed the gate.
if isinstance(concluded.verdict, Finished) and news == "":
return handed_on(key, epic, Landed.ON_EPIC_BRANCH if based is not None else Landed.ON_DEFAULT_BRANCH if repo is not None else Landed.NOWHERE)
return handed_on(key, epic, landed_in(repo, based))
def epic_based(key: str, root: str, epic: EpicRun) -> str | None | Stop:
@@ -354,6 +354,11 @@ class Landed(enum.Enum):
ON_EPIC_BRANCH = enum.auto()
def landed_in(repo: str | None, based: str | None) -> Landed:
"""Where the work of a chunk in the repo called repo landed: on the epic's working branch where based names it, else on the repo's default branch, nowhere for a chunk without a repo."""
return Landed.ON_EPIC_BRANCH if based is not None else Landed.ON_DEFAULT_BRANCH if repo is not None else Landed.NOWHERE
class How(enum.Enum):
"""How a finished chunk's issue moves when it doesn't move to a status the config names."""
# do-epic neither moves nor awaits it.