fix(logs): retry failed runs from failed block - #7304
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe PR changes failed-run retry to identify the sole unhandled terminating block and resume execution from that block using cached upstream state and the original workflow input.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/hooks/queries/logs.ts | The retry mutation now loads source execution state, starts run-from-block execution, and consumes streamed events until the selected block starts or an error terminates the attempt. |
| apps/sim/lib/logs/retry.ts | The new resolver selects one top-level unhandled failure and rejects execution histories that cannot be retried safely. |
| apps/sim/app/workspace/[workspaceId]/logs/logs.tsx | Retry actions now respect workspace edit permission and surface specific mutation errors. |
| apps/sim/hooks/queries/logs.test.tsx | Tests cover successful run-from-block requests, streamed validation failures, premature completion, and ambiguous failures. |
| apps/sim/lib/logs/retry.test.ts | Tests cover handled errors, trigger failures, missing history, multiple failures, nested groups, and unavailable trigger input. |
Sequence Diagram
sequenceDiagram
participant U as User
participant L as Logs UI
participant D as Log detail API
participant E as Workflow executor
U->>L: Retry failed execution
L->>D: Load source execution detail
D-->>L: Trace spans and workflow input
L->>L: Resolve sole unhandled failed block
alt Unsupported or ambiguous trace
L-->>U: Show specific retry error
else Retry target resolved
L->>E: Execute from failed block with source execution ID
E-->>L: Stream execution events
alt Validation error before block starts
L-->>U: Show streamed error
else Target block starts
L-->>U: Retry started
end
end
Reviews (3): Last reviewed commit: "fix(logs): retry failed runs from failed..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
bba9627 to
2ad58b6
Compare
|
@greptile review @cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
2ad58b6 to
471be26
Compare
|
@greptile review @cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
Summary
Changes the Logs Retry action to resolve the single unhandled terminating failure and resume from that block using the existing run-from-block executor path. Cached upstream execution state and the original workflow input are reused from the source execution.
Unsupported or ambiguous runs are blocked with a specific explanation instead of silently starting a full retry. Compacted trigger input and streamed current-workflow validation failures are surfaced instead of reporting a false start. Retry is also hidden for users without workspace edit permission.
Type of Change
Testing
Reviewers should focus on retry-target selection for handled versus unhandled failures and the explicit unsupported-case behavior.
Checklist
Screenshots/Videos
Browser proof will be attached in a separate PR comment.