Skip to content

fix(executor): preserve actors for actorless tool calls - #7230

Merged
TheodoreSpeaks merged 2 commits into
stagingfrom
fix/cred-list-require-user
Aug 28, 2026
Merged

fix(executor): preserve actors for actorless tool calls#7230
TheodoreSpeaks merged 2 commits into
stagingfrom
fix/cred-list-require-user

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • build credential-group executor principals in process so actorless workflows can list credentials
  • preserve the legacy execution actor for personal resource lookup and attribution while keeping authorization principal-based
  • apply actorless compatibility across custom tools, credential access, Knowledge, file sharing, Windchill transfers, and workflow reverts

Type of Change

  • Bug fix

Testing

  • bun run lint
  • bun run check:audits
  • bun run type-check in apps/sim
  • 173 focused tests

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 28, 2026 9:13pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR moves legacy actorless-execution compatibility into the trusted executor principal and removes separate execution-actor inputs from application use cases.

  • Adds a deployment-only, principal-bound compatibility actor for actorless executor delegations.
  • Uses that actor for personal credentials, custom tools, Knowledge, MCP, file-sharing, Windchill, and workflow-revert behavior while retaining principal-based workspace authorization and audit identity.
  • Constructs credential-group principals directly in process and adds focused compatibility and refusal-path tests.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/lib/internal/principals/executor.ts Binds the execution context user as a compatibility actor only when the trusted executor origin has no Sim-user subject.
apps/sim/lib/auth/internal-delegation.ts Adds validated compatibility-actor binding while rejecting empty actors and delegations that already have a user subject.
packages/auth/src/principal.ts Extends workflow delegation context with a deployment-only compatibility actor and resolves real principal subjects first.
apps/sim/lib/credentials/application/authorization.ts Centralizes credential execution-user resolution through the principal-bound compatibility policy.
apps/sim/lib/custom-tools/application/use-cases.ts Applies principal-derived execution-user scoping consistently to custom-tool reads, listings, updates, and deletes.
apps/sim/lib/knowledge/application/billing.ts Uses the principal-bound execution actor for Knowledge personal-resource and usage attribution paths.
apps/sim/lib/mcp/application/authorization.ts Removes caller-supplied execution identity and resolves MCP credential ownership from the principal.
apps/sim/lib/workspace-files/application/share-workspace-file.ts Preserves actorless deployment sharing behavior through the principal-bound execution actor.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Workflow execution context] --> B[Trusted executor adapter]
  B --> C{Principal has Sim user subject?}
  C -->|Yes| D[Use authenticated subject]
  C -->|No, deployed execution| E[Bind compatibility actor]
  D --> F[Principal-based workspace authorization]
  E --> F
  F --> G[Application operation]
  G --> H[Personal resource lookup using execution user]
  G --> I[Audit identity using principal]
Loading

Reviews (2): Last reviewed commit: "fix(auth): bind legacy execution actors ..." | Re-trigger Greptile

Comment thread apps/sim/lib/credentials/application/authorization.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 38 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/credentials/application/credential-crud.ts Outdated
Comment thread apps/sim/lib/workflows/application/deployments.ts Outdated
@TheodoreSpeaks
TheodoreSpeaks force-pushed the fix/cred-list-require-user branch from 5798075 to 53c24fc Compare August 28, 2026 21:13
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks
TheodoreSpeaks merged commit acc4f1d into staging Aug 28, 2026
27 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the fix/cred-list-require-user branch August 28, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant