Answer stability round 1: 0 🔴, 1 🟡 (0 misread); leave an item a person split to be closed by its team, and refuse a setting below the label table

This commit is contained in:
Lilleman
2026-11-19 16:28:14 +01:00
parent 90dd09e566
commit bfe32bc1fa
7 changed files with 38 additions and 19 deletions
+8 -4
View File
@@ -9,8 +9,8 @@ from do_epic.epic_record import CAP
from chunk_driver.claims import CHUNK_FLAG, epic_chunks, HANDED, loop_chunks, project_lock, starting
from do_epic.backend.protocol import EpicIssue
from failure import Failure
from do_epic.split import finished, is_split
from do_epic.repo_pick import HumanTask, LabelRepos, Pick, recorded, Repo
from do_epic.split import is_split
from project_config.settings import PARALLEL_CHUNKS
from do_epic.parked import parked_chunks
from chunk_pr.approval import PARKS
@@ -97,13 +97,17 @@ def held_up(issues: list[EpicIssue]) -> dict[str, list[str]]:
def chunks(issues: list[EpicIssue], team: LabelRepos) -> tuple[list[Chunk], list[Waits]]:
"""The open issues to work as chunks, in the tracker's rank order, and those that wait. A split item is worked through its sub-tasks, and what blocks it blocks them. team maps the team's own labels to repos."""
"""The open issues to work as chunks, in the tracker's rank order, and those that wait. A split item is worked through its sub-tasks, and what blocks it blocks them."""
by_key = {issue.key: issue for issue in issues}
holding = held_up(issues)
found: list[Chunk] = []
waits: list[Waits] = []
for issue in issues:
if issue.done or is_split(issue, issues):
if issue.done:
continue
if is_split(issue, issues):
if all(task.done for task in issues if task.parent == issue.key) and not finished(issues, issue.key):
waits.append(Waits(issue.key, "its sub-tasks are done; close it in Jira"))
continue
turn = turn_of(issue, recorded(issue, team), open_blockers(issue, by_key), by_key, issue.key in holding)
if isinstance(turn, Chunk):
@@ -118,7 +122,7 @@ def turn_of(issue: EpicIssue, pick: Pick | None | Failure, blocking: list[str],
if isinstance(pick, Failure):
return Waits(issue.key, pick.reason)
if pick is None:
return Waits(issue.key, "no label names its repo")
return Waits(issue.key, "no label names its repo" + ("; label it in Jira, since do-epic plans no sub-task" if issue.parent in by_key else ""))
if isinstance(pick, HumanTask):
return Chunk(issue.key, None, human=True) if holds and not blocking else Waits(issue.key, "it is a human's task")
if blocking: