Uh oh!
There was an error while loading. Please reload this page.
feat(mship): async runs - #6329
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe PR adds asynchronous Copilot
Confidence Score: 4/5The PR should not merge until the undeployed async-workflow path releases its reserved execution slot. A rejected bound async launch currently retains an admission slot until expiration, allowing repeated preflight failures to incorrectly exhaust workflow concurrency for the billing account. Files Needing Attention: apps/sim/app/api/workflows/[id]/execute/route.ts
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/workflows/[id]/execute/route.ts | Adds bound async Copilot execution and deployment preflight handling, but the undeployed-workflow return leaks its reserved execution slot. |
| apps/sim/lib/copilot/tools/client/run-tool-execution.ts | Adds asynchronous queueing, background confirmation, and tab-local recovery for client workflow tools. |
| apps/sim/background/workflow-execution.ts | Preserves Copilot correlation and trigger-block selection when executing queued workflow jobs. |
| apps/sim/app/api/copilot/confirm/route.ts | Projects only allowlisted async deployment failures into structural tool confirmations. |
| apps/sim/lib/copilot/request/handlers/tool.ts | Treats an accepted explicitly asynchronous workflow launch as a successful tool result. |
| apps/sim/lib/copilot/generated/tool-catalog-v1.ts | Adds the run_workflow async parameter and removes scheduled-task tool definitions from the generated catalog. |
Sequence Diagram
sequenceDiagram
participant M as Mothership
participant B as Browser client
participant API as Workflow execute route
participant Q as Job queue
participant W as Background worker
M->>B: "run_workflow(async=true)"
B->>API: POST execute (X-Execution-Mode: async)
API->>API: Authenticate, claim IDs, preprocess
alt deployment valid
API->>Q: Enqueue correlated execution
API-->>B: 202 + executionId
B-->>M: background confirmation
Q->>W: Execute deployed workflow
else missing or stale deployment
API-->>B: Structured deployment error
B-->>M: Allowlisted failure confirmation
end
Reviews (1): Last reviewed commit: "Fix lint" | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
|
Summary
Mship async run workflow
Companion: https://github.com/simstudioai/mothership/pull/411
Type of Change
Testing
Manual
Checklist