feat: persist workflow controls and settle stopped branches

This commit is contained in:
2026-09-18 04:32:02 +08:00
parent 7d5ebfcb09
commit 7eac8c365a
35 changed files with 1539 additions and 36 deletions

View File

@@ -124,6 +124,8 @@ func (s *WorkflowSignalStore) Send(ctx context.Context, t auth.Token, workflow c
state, disposition = "REJECTED", "STALE_ACTIVATION"
case g.view.State.Terminal():
state, disposition = "REJECTED", "WORKFLOW_SETTLED"
case g.view.StopKind != nil:
state, disposition = "REJECTED", "WORKFLOW_STOPPING"
case !now.Before(g.view.DeadlineAt):
state, disposition = "EXPIRED", "WORKFLOW_DEADLINE"
case row.view.State == weave.StepSkipped || row.view.State == weave.StepSucceeded || row.view.State == weave.StepFailed || row.view.State == weave.StepCancelled || row.view.State == weave.StepNeedsReview: