fix(approvals): a REJECTED decision must not satisfy the stage approval gate on retry
This commit is contained in:
+5
-2
@@ -661,8 +661,11 @@ class DefaultSessionOrchestrator(
|
||||
.map { it.requestId }
|
||||
.toSet()
|
||||
stageRequestIds.isNotEmpty() && events.any {
|
||||
(it.payload as? ApprovalDecisionResolvedEvent)
|
||||
?.requestId in stageRequestIds
|
||||
val decision = it.payload as? ApprovalDecisionResolvedEvent
|
||||
// A REJECTED decision must NOT satisfy the gate on retry/resume, else the stage
|
||||
// runs unapproved. Only APPROVED/AUTO_APPROVED count as a prior approval.
|
||||
decision?.requestId in stageRequestIds &&
|
||||
decision?.outcome != ApprovalOutcome.REJECTED
|
||||
}
|
||||
}
|
||||
if (!alreadyApproved) {
|
||||
|
||||
Reference in New Issue
Block a user