feat(workflows): preserve execution principals - #6891
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview Identity persistence. Snapshots and queued jobs serialize principals with versioning. Legacy jobs/pauses restore only unambiguous identity (session vs actorless External triggers and Credential Groups. Slack webhooks attach a verified Reviewed by Cursor Bugbot for commit dc027f2. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR introduces versioned execution principals and carries verified identity through synchronous, queued, nested, webhook, and paused workflow execution.
Confidence Score: 5/5The PR appears safe to merge. The previously reported legacy snapshot incompatibility is addressed by the bounded unversioned decoder, and no blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/auth/src/principal.ts | Defines the versioned principal model, serialization, parsing, and subject-resolution helpers used across execution boundaries. |
| apps/sim/executor/execution/snapshot.ts | Versions newly persisted snapshots and restores pre-principal snapshots through a bounded compatibility decoder. |
| apps/sim/executor/execution/snapshot-serializer.ts | Requires the active execution principal to be included when serializing resumable workflow state. |
| apps/sim/background/workflow-execution.ts | Parses queued principals and reconstructs bounded authority for legacy workflow jobs. |
| apps/sim/background/webhook-execution.ts | Validates persisted webhook principals and reconstructs the canonical webhook identity for legacy jobs. |
| apps/sim/lib/credentials/application/resolve-managed-oauth-token.ts | Applies the propagated execution principal when resolving managed credentials. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Authenticated request or verified trigger] --> P[Versioned execution principal]
P --> E[Workflow execution]
E --> Q[Queued or nested execution]
E --> S[Pause snapshot]
Q --> R[Principal validation and restoration]
S --> R
R --> C[Credential and operation authorization]
Reviews (8): Last reviewed commit: "fix(workflows): restore legacy paused ap..." | Re-trigger Greptile
8532691 to
43e2364
Compare
43e2364 to
5aba920
Compare
29b8a6d to
64c4f10
Compare
64c4f10 to
a377050
Compare
|
@cursor review |
41ea290 to
3f85676
Compare
|
@cursor review |
|
@cursor review |
aebf473 to
4489fc2
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 33caa1f. Configure here.
33caa1f to
dc027f2
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dc027f2. Configure here.

Summary
Type of Change
Testing
bun run lintbun run check:auditsChecklist
Screenshots/Videos
Not applicable; this branch has no new UI.