From 2a82ad62d35682cc429f719e15898c6b4213239e Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Fri, 2 Oct 2026 11:45:46 +1000 Subject: [PATCH] docs(prreview): the approval path keeps the task's workflow, it does not force implement The PRD still described both approval surfaces requeueing under a hardcoded implement workflow. The shipped path passes an empty workflow, which Requeue reads as keep-the-task's, so the feasibility handoff has to name implement on the task before the wait rather than relying on the handler. --- docs/prds/pr-review-operator-response.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/prds/pr-review-operator-response.md b/docs/prds/pr-review-operator-response.md index 293fa26b5..b16de797f 100644 --- a/docs/prds/pr-review-operator-response.md +++ b/docs/prds/pr-review-operator-response.md @@ -12,7 +12,7 @@ The dashboard's `POST /api/tasks/{id}/action` (`internal/webui/api_tasks.go`, `h The path is `handleTaskAction` → `applyOperatorTaskAction` → `Chat.Contract.ApplyOperatorTaskAction` → the daemon's `LocalChatAdapter` → `taskactions.Client` (NATS `archie.gateway.task-action`) → `taskactions.Service.Apply` → one guarded store write that records the decision and requeues. Chat's `/approve` path (`StoreTaskController.Approve` → `chatTaskControllerAdapter.ApproveChatTask`) must reach that same write through the same function, so the two surfaces cannot record different decisions for one operator intent. -A requeue resumes the workflow the waiting state names, never a name the handler hardcodes. `taskactions.Service.apply` and `chatTaskControllerAdapter.ApproveChatTask` requeue every approval under `implement`, which is the feasibility handoff: an approval whose wait recorded `pr-review` would run the implement workflow. Feasibility must keep that handoff by naming `implement` on the task before it enters the wait, which is the invariant the handler needs — the workflow a task carries is the workflow it runs next. `Requeue` treats an empty workflow as "keep the task's". +A requeue resumes the workflow the waiting state names, never a name the handler hardcodes. `taskactions.Service.apply` and `chatTaskControllerAdapter.ApproveChatTask` requeue with an empty workflow, which `Requeue` reads as "keep the task's", so neither surface hardcodes a workflow name: an approval whose wait recorded `pr-review` resumes `pr-review`. The feasibility handoff therefore has to name `implement` on the task before it enters the wait, which is the invariant the handler relies on — the workflow a task carries is the workflow it runs next. `Requeue` treats an empty workflow as "keep the task's". ### The review the operator answers