Answer stability round 1: 0 🔴, 5 🟡 (0 misread); park the window first, resend a failed DM, reword docstrings and trim two tests
This commit is contained in:
@@ -20,7 +20,7 @@ from agent_cycle import tmux
|
||||
# Under the home folder, a folder per epic key holds the epic's LOCK. A chunk without a repo works there.
|
||||
STATE = ".local/state/do-epic"
|
||||
# Why a human's task with a live window waits, as the epic's status says.
|
||||
HUMAN_WAIT = "it is a human's task; do-epic polls until its issue closes"
|
||||
HUMAN_WAIT = "it is a human's task; do-epic polls Jira until you close it"
|
||||
# The flag that tells the do-epic in a window its chunk, as `--chunk ABC-34 ABC-12`. Nobody types it, so no panel picked it.
|
||||
CHUNK_FLAG = "--chunk"
|
||||
|
||||
@@ -31,7 +31,7 @@ class Chunk:
|
||||
issue: str
|
||||
# The name of the repo it changes; None for work without a repo.
|
||||
repo: str | None
|
||||
# Whether it is a human's task that holds up another open issue: its window only waits for the human to close the issue (`human_tasks`), and takes no running slot.
|
||||
# Whether it is a human's task that holds up another open issue: its window only waits for the human to close the issue (`human_tasks`), and doesn't take a running slot.
|
||||
human: bool = False
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ def open_blockers(issue: EpicIssue, by_key: dict[str, EpicIssue]) -> list[str]:
|
||||
|
||||
|
||||
def held_up(issues: list[EpicIssue]) -> dict[str, list[str]]:
|
||||
"""For each issue that blocks an open issue to work as a chunk, the keys of the open issues it blocks, in the tracker's rank order."""
|
||||
"""Each blocker's key, mapped to the keys of the open issues it holds up, in the tracker's rank order. A split item's blocker holds up the item's sub-tasks."""
|
||||
by_key = {issue.key: issue for issue in issues}
|
||||
held: dict[str, list[str]] = {}
|
||||
for issue in issues:
|
||||
@@ -98,7 +98,7 @@ def held_up(issues: list[EpicIssue]) -> dict[str, list[str]]:
|
||||
|
||||
|
||||
def chunks(issues: list[EpicIssue]) -> tuple[list[Chunk], list[Waits]]:
|
||||
"""The open issues to work as chunks, in the tracker's rank order, and those that wait. An item split by repo is worked through its sub-tasks, and what blocks it blocks them. A blocker outside the epic blocks until the human removes the link, since its state is unknown. A human's task is a chunk only while it holds up another issue and nothing holds it up: its window waits for the human."""
|
||||
"""The open issues to work as chunks, in the tracker's rank order, and those that wait. An item split by repo is worked through its sub-tasks, and what blocks it blocks them. A blocker outside the epic blocks until the human removes the link, since its state is unknown. A human's task gets a window only while it holds up another issue and nothing holds it up; that window waits for the human."""
|
||||
by_key = {issue.key: issue for issue in issues}
|
||||
holding = held_up(issues)
|
||||
found: list[Chunk] = []
|
||||
@@ -241,5 +241,5 @@ def status(key: str, home: pathlib.Path, issues: list[EpicIssue], run: tmux.Tmux
|
||||
elif chunk.human and chunk.issue in live:
|
||||
reasons[chunk.issue] = HUMAN_WAIT
|
||||
elif chunk.issue not in live:
|
||||
reasons[chunk.issue] = f"its window stopped; {again}" if chunk.issue in {window.name for window in windows} else f"it has not started; `do-epic {key}` starts it once the epic and its repo have room"
|
||||
reasons[chunk.issue] = f"its window stopped; {again}" if chunk.issue in {window.name for window in windows} else f"it has not started; `do-epic {key}` starts it" + ("" if chunk.human else " once the epic and its repo have room")
|
||||
return [f"{issue.key} waits: {reasons[issue.key]}" if issue.key in reasons else f"{issue.key} runs" for issue in issues if issue.key in reasons or issue.key in live]
|
||||
|
||||
Reference in New Issue
Block a user