Repository navigation
fix(workflow-executor): file no approval request on a step that refuses approvals - #2074
Conversation
…es approvals A Trigger Action step saved without approval branches whose action now requires approval errored as a configuration error in Full AI, but agent-client had already filed an approval request that stayed open with no run. Approving it ran the action outside the workflow. The executor now runs the action with agent-client's new `skipApprovalRequest` option on such a step, so the agent's refusal surfaces as ActionRequiresApprovalError and the step errors with no open request. agent-client's default still files the request. Part of PRD-29 (QA bug 16) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scra3
left a comment
There was a problem hiding this comment.
Spec (PRD-29): conforms to QA bug 16, a Full AI step saved without branches errors as configuration and files no request.
PRD-29 has 13 unvalidated decisions: not final.
|
Coverage Impact ⬇️ Merging this pull request will decrease total coverage on Modified Files with Diff Coverage (4)
🛟 Help
|
Forest Validator · Review: findings posted
1 earlier step
|
…spatched again The refusal left the `executing` write-ahead record, so a re-dispatch read the step as interrupted instead of erroring on the missing branches. Nothing ran, so the record is deleted before the configuration error is raised. Part of PRD-29 (QA bug 16) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing to its own module The step executor mixed what its approval outcomes decide with mode dispatch, AI form filling and action selection, and the last four changes to it were all about approvals. TriggerActionApprovals now owns the outcome getters, the pause, the settlement of a filed request, the replay of its review, the decline on a branch and the refusal on a step saved without branches. No behaviour change. Part of PRD-29 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 new issues
|
Scra3
left a comment
There was a problem hiding this comment.
Spec (PRD-29): conforms to QA bug 16, a Full AI step saved without branches errors as configuration and files no request.
PRD-29 has 14 unvalidated decisions: not final.
…e that made it The executor writes the `executing` record in `beforeCall`, so it now clears it in its own catch instead of in the approvals module, and a failed delete is logged rather than hiding the configuration error. The refusal tests also assert the caller argument of `executeAction`. Part of PRD-29 (QA bug 16) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Part of PRD-29 (QA bug 16)
Bug: in Full AI, a Trigger Action step saved without approval branches whose action now requires approval errored as a configuration error, but agent-client had already filed an approval request that stayed open with no run. Approving it ran the action outside the workflow.
Fix: on such a step the executor runs the action with a new agent-client option,
skipApprovalRequest, so the agent's refusal comes back asActionRequiresApprovalErrorand the step errors withApprovalBranchesMissingErrorand no open request. The message no longer names a request. agent-client's default is unchanged: it still files the request for every other caller.Tests
skipApprovalRequestthrowsActionRequiresApprovalErrorwithout calling the request creator; the existing tests still cover the default filing.execute.approvalOutcomesabsent, sends no flag and still files and links its request.Refactor: the step's approval handling moved out of
trigger-record-action-step-executor.tsintotrigger-action-approvals.ts(TriggerActionApprovals), in its own commit with no behaviour change.Out of scope: Manual and AI-assisted. There the front's native form files the request, so a step without branches still ends with an open request named in the error.
🤖 Generated with Claude Code
Note
Skip approval request when a trigger-action step has no approval branches
skipApprovalRequesttoExecuteActionQueryandActionExecuteOptions, and forwards it from agent-client-agent-port.ts toAction.executeTriggerRecordActionStepExecutor.executeOnExecutorsets the flag for steps saved without approval branches. If the action still requires approval, it deletes the saved executing record and throwsApprovalBranchesMissingErrorTriggerActionApprovalshelper in trigger-action-approvals.tsMacroscope summarized 9a3f9d2.