feat(copilot): let Run agent cancel workflow runs - #7151
Open
j15z wants to merge 13 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThe PR adds workflow-run cancellation to the Run agent and consolidates internal, Copilot, and v2 cancellation behind one authorized application operation.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/execution/cancel-workflow-execution.ts | Centralizes cancellation reconciliation and confirms all relevant active-resume stops before publishing or completing paused cancellation. |
| apps/sim/lib/workflows/application/cancel-run.ts | Provides the shared authorized application operation used by all cancellation transports. |
| apps/sim/lib/copilot/tools/handlers/workflow/mutations.ts | Delegates Run-agent cancellation through the shared use case with the trusted principal and abort signal. |
| apps/sim/app/api/v2/workflows/[workflowId]/runs/[runId]/cancel/route.ts | Uses the shared cancellation operation while retaining the v2 terminal no-op projection. |
| apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts | Reduces the internal route to authentication, input mapping, and application-operation delegation. |
Sequence Diagram
sequenceDiagram
participant Caller as Internal / Copilot / v2
participant App as cancelWorkflowRun
participant Auth as Workflow authorization
participant Exec as Cancellation reconciliation
Caller->>App: principal + workflowId + runId + AbortSignal
App->>Auth: authorize write access and resolve run context
Auth-->>App: canonical workflow/run context
App->>Exec: cancel execution
Exec->>Exec: stage paused state and signal active work
Exec->>Exec: confirm original and replacement resume stops
Exec->>Exec: publish terminal event and finalize state
Exec-->>App: cancellation result or terminal error
App-->>Caller: transport-specific response
Reviews (10): Last reviewed commit: "fix(workflows): confirm every active res..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Collaborator
Author
j15z
force-pushed
the
feat/let-mship-cancel-workflow-runs
branch
from
August 27, 2026 04:35
106a466 to
2a37dbe
Compare
Collaborator
Author
Collaborator
Author
Collaborator
Author
j15z
force-pushed
the
feat/let-mship-cancel-workflow-runs
branch
from
August 27, 2026 04:53
4bd0e2a to
00e58f0
Compare
Collaborator
Author
j15z
force-pushed
the
feat/let-mship-cancel-workflow-runs
branch
from
August 27, 2026 05:35
00e58f0 to
e6c8777
Compare
Collaborator
Author
Collaborator
Author
Collaborator
Author
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Checklist