Answer product-owner round 1: 0 🔴, 4 🟡 (0 misread); move through the open status, refuse open-epic without a branch, tell a conflict from git's other failures

This commit is contained in:
Lilleman
2026-11-20 20:15:33 +01:00
parent 9f367e90ca
commit ce2e9dc0e5
9 changed files with 143 additions and 21 deletions
+6 -3
View File
@@ -311,12 +311,12 @@ def chunk_run(key: str, epic: EpicRun) -> Stop:
root, repo = place
if unmade := folder_made(root):
return Stop(1, unmade.reason)
if issue:
issue_started(key, epic)
# The epic's working branch the chunk merges into; None where its repo keeps none, as for a chunk without a repo.
based = epic_based(key, root, epic) if repo is not None else None
if isinstance(based, Stop):
return based
if issue:
issue_started(key, epic)
session = session_named(f"A {epic.key} do-epic {key}", epic.paths.claude_code_transcripts)
loop = Loop(root=root, session=session, window=tmux.Window(epic.session, key, pane), paths=epic.paths, env=epic.env, launcher=epic.launcher, effects=epic.effects)
run = ChunkRun()
@@ -521,13 +521,16 @@ def folder_made(root: str) -> Failure | None:
def handed_on(key: str, epic: EpicRun, in_repo: bool = False, humans: bool = False, to_epic_branch: bool = False) -> Stop:
"""The stop of a do-epic whose chunk finished. It first moves the chunk's issue to done (the epic's finishing has none), and its split item too where that was the last of the item's sub-tasks, so that no finished chunk starts again and what they block may start, then starts each chunk that may start now. Where the team's automation moves issues, others move two kinds of issue. The automation moves the issue of a chunk in a repo, which in_repo marks, from its pull request: the stop waits for that move (`moved_by_automation`). The human moves their own task, which humans marks: the stop moves and awaits nothing. A chunk without a repo has no pull request, so its issue moves to done as ever, and so does a split item, once Jira counts each of its sub-tasks done. The automation doesn't see a pull request that merged into an epic's working branch, which to_epic_branch marks: the stop moves that chunk's issue to the status `jira-pull-request-merged-status` names. Where none is named, it moves the issue to done, or stops where the automation moves issues, since nothing would. Its window closes as it exits."""
"""The stop of a do-epic whose chunk finished. It first moves the chunk's issue to done (the epic's finishing has none), and its split item too where that was the last of the item's sub-tasks, so that no finished chunk starts again and what they block may start, then starts each chunk that may start now. Where the team's automation moves issues, others move two kinds of issue. The automation moves the issue of a chunk in a repo, which in_repo marks, from its pull request: the stop waits for that move (`moved_by_automation`). The human moves their own task, which humans marks: the stop doesn't move or await anything. A chunk without a repo has no pull request, so its issue moves to done as ever, and so does a split item, once Jira counts each of its sub-tasks done. The automation doesn't see a pull request that merged into an epic's working branch, which to_epic_branch marks: the stop moves that chunk's issue to the status `jira-pull-request-merged-status` names. Where none is named, it moves the issue to done, or stops where the automation moves issues, since then nobody would move it. do-epic's window closes as it exits."""
automated = epic.config.automation_moves
# The epic's finishing has no issue to move: the epic is closed by `--close-epic`. Nor has a human's task where the human moves it: its window waited until it holds up no issue.
if key == epic.key or (humans and automated):
issues: list[EpicIssue] | Failure = epic.store.read()
elif to_epic_branch and (status := epic.config.pull_merged_status):
moved = epic.store.move_issue(key, status)
# A chunk that never parked left its issue before the open status, from which a workflow may offer no way to the merged one.
if isinstance(moved, Failure) and (opened := epic.config.pull_open_status) and not isinstance(epic.store.move_issue(key, opened), Failure):
moved = epic.store.move_issue(key, status)
if isinstance(moved, Failure):
return Stop(1, f"the chunk finished, but its issue could not move to {status!r}: {moved.reason}; once it has that status in Jira, run `do-epic {epic.key}` to start the chunks it blocks")
issues = epic.store.read()