From e4101f991aa5254a790dc38551d97cc8097a3124 Mon Sep 17 00:00:00 2001 From: yashsinghcodes Date: Fri, 1 May 2026 13:14:51 +0530 Subject: [PATCH] Revert "fix: ignore duplicate action results during execution updates" This reverts commit fb4c1edb7bac279a40887b52ddf0029136e3fea1. --- backend/go-app/walkoff.go | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index e6167cb4..b8abdf8d 100755 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -593,15 +593,6 @@ func runWorkflowExecutionTransaction(ctx context.Context, attempts int64, workfl return } - if hasEquivalentActionResult(*workflowExecution, actionResult) { - log.Printf("[DEBUG][%s] Ignoring duplicate action result for action %s with status %s", workflowExecutionId, actionResult.Action.ID, actionResult.Status) - if resp != nil { - resp.WriteHeader(http.StatusOK) - resp.Write([]byte(`{"success": true, "reason": "duplicate result ignored"}`)) - } - return - } - workflowExecution, dbSave, err := shuffle.ParsedExecutionResult(ctx, *workflowExecution, actionResult, false, 0) if err != nil { b, suberr := json.Marshal(actionResult) @@ -637,32 +628,6 @@ func runWorkflowExecutionTransaction(ctx context.Context, attempts int64, workfl } -func hasEquivalentActionResult(workflowExecution shuffle.WorkflowExecution, incoming shuffle.ActionResult) bool { - for _, existing := range workflowExecution.Results { - if existing.Action.ID != incoming.Action.ID { - continue - } - - if existing.Status != incoming.Status { - continue - } - - if existing.CompletedAt > 0 && incoming.CompletedAt > 0 && existing.CompletedAt == incoming.CompletedAt { - return true - } - - if existing.StartedAt > 0 && incoming.StartedAt > 0 && existing.StartedAt == incoming.StartedAt { - return true - } - - if len(existing.Result) > 0 && existing.Result == incoming.Result { - return true - } - } - - return false -} - func JSONCheck(str string) bool { var jsonStr interface{} return json.Unmarshal([]byte(str), &jsonStr) == nil