Repository navigation
feat(workflow-executor): pause a Trigger Action step on its approval and resume on the reviewer's branch [PRD-2004] - #2063
Conversation
…paused step's requests [PRD-2004] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…request and resume on the reviewer's branch [PRD-2004] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a Trigger Action [PRD-2004] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 new issues
|
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (8) 🛟 Help
|
Scra3
left a comment
There was a problem hiding this comment.
Spec (PRD-2004): conforms, except "Always send selectedOption on these steps" on the native-form path, raised inline.
| result && !('skipped' in result) && result.submissionOutcome === 'pending-approval'; | ||
| const approvalRequest = isPendingApproval ? result.approvalRequest : undefined; | ||
|
|
||
| if (isPendingApproval && this.hasApprovalOutcomes) { |
There was a problem hiding this comment.
Claude Opus 5.5 (claude-opus-5-5): Preferential: a paused approval step keeps a done record and resumes through the idempotency replay, and no ADR records that choice.
Code
Paused runs persist a done plus pending-approval record, a reader asks why a waiting step is done, and a pause phase was the alternative.
A way out: record the decision with /adr in docs/adr/.
There was a problem hiding this comment.
Claude Opus 5.5 (claude-opus-5-5): No ADR, the paused done record fails the hard-to-reverse leg of the gate.
Why
A later pause phase can still read today's done plus pending-approval records the way checkIdempotency does, so switching costs one read path, not a migration.
The record lives in the client's RunStore and never crosses the orchestrator contract.
Forest Validator · Review: findings posted
|
…Action with approval branches [PRD-2004] A step finished by hand reports no branch until the native form carries one (PRD-2013), so the orchestrator errored the run after the human submitted. The step now errors before handing the form over, and CLAUDE.md states the approval exception to the idempotency replay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scra3
left a comment
There was a problem hiding this comment.
Approved after /verify-fixes run 2063-20261105161509-Scra3-verify: 3 findings of 2063-20261105150321-Scra3 closed or declined, none reopened.
d386f0f
into
feature/prd-29-handle-action-approvals-within-workflows

What
Executor side of PRD-2004, milestone M1 (automatic mode). Server side: ForestAdmin/forestadmin-server#8741. Contract: Dev split.
approvalOutcomes(the non-strict schema used to drop it). The pending step'scontext.approvalRequests({ id, status, approverId }) now reaches the executor, an unknown status being dropped. A record outcome carriesawaitingInputReason: 'pending-approval',approvalRequests,selectedOption(approved/rejected) andapproverId, all forwarded to the orchestrator.selectedOption: 'approved'.checkIdempotency), once the orchestrator requeues the run:approved/rejected→ success on that branch withapproverId, and the decision is saved in the RunStore;failed→ operator error;approvalOutcomesbehave exactly as today.Not in this PR
selectedOption, so the orchestrator errors it rather than going down Approved. Choosing the branch belongs to PRD-2014 (Q7).How to play it
Follow the "How to play it" section of ForestAdmin/forestadmin-server#8741 with this branch running as the executor.
Part of PRD-2004
🤖 Generated with Claude Code
Note
Add approval pause and resume to Trigger Action steps in
workflow-executorapprovalOutcomesenabled now pause after filing an approval request and resume on replay without resubmitting the action, succeeding on the approved or rejected branch. See trigger-record-action-step-executor.ts.ApprovalRequestUntrackedError,ApprovalRequestFailedError, andApprovalRequestGoneErrorfor missing request IDs, failed approvals, and unrecognized review statuses.approvalOutcomesset; the existing pending-approval replay path remains for other steps. Missing approval request IDs, failed approvals after review, and reviews with no recognized status now produce step errors; open or missing reviews pause again.Changes since #2063 opened
ApprovalBranchesNeedFullAiErrorand a guard inTriggerRecordActionStepExecutor.pauseForConfirmationthat throws it when native-form fallback occurs on a step with approvalOutcomes [0fa16c0]trigger-record-action-step-executor.test.tsfor theApprovalBranchesNeedFullAiErrorpath [0fa16c0]workflow-executorCLAUDE.mddocumentation [0fa16c0]Macroscope summarized 9053246.