fix(workflows): migrate Copilot application boundary - #6455
fix(workflows): migrate Copilot application boundary#6455TheodoreSpeaks wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Copilot now enters operations via Human-facing deploy/activate passes v1 v1 deploy route GET/POST/PATCH/DELETE lean on v2 public execute always runs Workflow-in-workflow executor loads children with Reviewed by Cursor Bugbot for commit b80a521. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR moves protected workflow operations behind scoped application use cases, adds fail-closed pre-auth admission for anonymous v2 execution, and defers deployment analytics until durable activation.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/copilot/application/execute-workflow-use-case.ts | Establishes the delegated Copilot-to-workflow application boundary with scoped principal authorization. |
| apps/sim/lib/copilot/tools/handlers/vfs-mutate.ts | Routes workflow VFS mutations through authorized workflow use cases while retaining direct checks for other VFS categories. |
| apps/sim/app/api/v2/workflows/[id]/execute/route.ts | Applies optional API-key admission and fail-closed IP limiting before anonymous workflow lookup. |
| apps/sim/lib/workflows/deployment-outbox.ts | Adds durable checkpoints for post-activation audit, realtime, and analytics effects. |
| apps/sim/lib/workflows/orchestration/deploy.ts | Propagates actor and analytics intent into durable deployment preparation and activation. |
| apps/sim/lib/workflows/application/workflow-vfs.ts | Implements authorized workflow VFS operations with workspace-scoped write requirements. |
| apps/sim/lib/workflows/application/authorization.ts | Defines delegated workflow scope checks used by the migrated Copilot application boundary. |
| apps/sim/app/api/workflows/[id]/deploy/route.ts | Replaces route-local workflow authorization and persistence with application use cases. |
Sequence Diagram
sequenceDiagram
participant Caller
participant Route as Workflow API Route
participant Admission as Auth / Admission
participant UseCase as Workflow Application Use Case
participant Authz as Workspace Authorization
participant DB as Postgres
participant Outbox as Deployment Outbox
participant Effects as Audit / Realtime / Analytics
Caller->>Route: Workflow request
Route->>Admission: Authenticate or pre-auth admit
Admission-->>Route: Scoped principal / anonymous admission
Route->>UseCase: Execute operation
UseCase->>Authz: Authorize principal and workspace
Authz-->>UseCase: Allowed
UseCase->>DB: Read or mutate workflow
alt Deployment activation
UseCase->>Outbox: Enqueue durable preparation
Outbox->>DB: Activate deployment
Outbox->>Effects: Emit checkpointed effects
else Other workflow operation
UseCase->>Effects: Emit centralized effects
end
UseCase-->>Route: Result
Route-->>Caller: Response
Reviews (5): Last reviewed commit: "fix(workflows): preserve VFS validation ..." | Re-trigger Greptile
9fad504 to
448b493
Compare
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 448b493. Configure here.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d26ec3f. Configure here.
|
@cursor review |
00d19ca to
b80a521
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b80a521. Configure here.
Summary
Testing
bun run --filter sim type-checkbun run lintbun run check:api-validation:strictgit diff --check