Park a chunk whose pull request waits on a gate, resume it when the gate opens, and print each chunk's state with do-epic --status
CI / tests (pull_request) Failing after 4m4s

This commit is contained in:
2026-11-18 23:17:07 +01:00
parent 1df19f4ac8
commit f0c8a26688
7 changed files with 344 additions and 30 deletions
+13 -1
View File
@@ -1,4 +1,7 @@
"""What a do-epic cycle's worker is told: its task, from the issue, and its first prompt. The resumed prompt and the rung sentences are the ones loop-claude's cycles use, naming do-epic."""
"""What a do-epic cycle's worker is told: its task, from the issue, and its first prompt. The resumed prompt and the rung sentences are the ones loop-claude's cycles use, naming do-epic; a chunk that was parked is first told why it resumes."""
import dataclasses
from agent_cycle.worker_prompts import WorkerPrompts
from do_epic.backend.protocol import EpicIssue
from model_routing.ladder import ProjectRung
from loop_claude.cycle import prompts
@@ -26,3 +29,12 @@ def fresh(task: str, premises: str, route: Route, project: ProjectRung | None, f
# The worker names no plan items: the chunk's one item is its issue.
WORKER = prompts.worker_prompts(DRIVER, fresh, "")
# What a worker does with a reviewer's feedback, as the decision asks (docs/decisions.md → `do-epic: drives one Jira epic …`, "Long gates").
FEEDBACK = 'Where a reviewer left feedback, fix what is reasonable and push it, answer the rest in its thread, and change the setup so review would have caught it (~/.claude/CLAUDE.md → "Working loop", "Change the setup for each finding an outside reviewer raises"). Then merge the pull request as before.'
def unparked(news: str) -> WorkerPrompts:
"""The prompts of the first cycle after a parked chunk resumes: WORKER's, with each prompt that starts a worker opening with news, which says what the chunk waited on and what changed. The fresh prompt opens with it too, since a chunk the judge ruled finished before it parked has no session left to resume."""
opening = f"{news} {FEEDBACK}\n\n"
return dataclasses.replace(WORKER, fresh=lambda *task: opening + WORKER.fresh(*task), resumed=lambda *evidence: opening + WORKER.resumed(*evidence))