feat(code): cli sandboxes, enterprise timeouts, secrets projections, resolver lift, workflow exec cancellations - #6247
Conversation
…lver # Conflicts: # apps/sim/components/settings/navigation.test.ts # apps/sim/components/settings/navigation.ts # apps/sim/providers/index.test.ts
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 35640005 | Triggered | Generic Password | 1a7c79b | apps/desktop/src/main/browser-import/import-service.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview Secrets and code execution move behind a shared code-placeholder compiler for JavaScript, Python, and Shell: Runtime policy: Enterprise workspaces can raise async workflow timeouts up to seven days; async API callers may shorten a run via Smaller contract fixes include upload receipt tokens on batch presigned URLs, distinct execution attachment keys for multipart uploads, Azure multipart completion passing Reviewed by Cursor Bugbot for commit 05e6447. Configure here. |
Greptile SummaryThis PR centralizes execution-time placeholder and secret handling while expanding sandbox, timeout, and cancellation capabilities.
Confidence Score: 5/5The PR appears safe to merge within the scope of this follow-up review. No blocking failure remains in the eligible follow-up review scope.
|
| Filename | Overview |
|---|---|
| apps/sim/executor/variables/resolver.ts | Centralizes code-context resolution while preserving environment placeholders for execution-boundary compilation. |
| apps/sim/lib/execution/code-placeholders/index.ts | Introduces the shared JavaScript, Python, and Shell placeholder-compilation boundary. |
| apps/sim/lib/execution/remote-sandbox/cli-tools.server.ts | Defines pinned, checksum-verified server-side installation recipes for managed sandbox CLIs. |
| apps/sim/lib/billing/execution-timeout-defaults.ts | Resolves plan and Enterprise-specific execution timeout policies. |
| apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts | Coordinates durable cancellation state, backend job cancellation, local aborts, resumed executions, and terminal event publication. |
| apps/sim/lib/core/async-jobs/backends/trigger-dev.ts | Adds execution-scoped Trigger.dev cancellation using tags and payload verification. |
| packages/db/schema.ts | Adds persisted metadata supporting configurable Enterprise execution limits and related sandbox behavior. |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Execution API
participant Policy as Timeout Policy
participant Queue as Async Backend
participant Executor
participant Sandbox
participant Projection as Secret Projection
Client->>API: Start workflow
API->>Policy: Resolve account and request timeout
Policy-->>API: Effective deadline
API->>Queue: Enqueue execution with deadline
Queue->>Executor: Run workflow
Executor->>Sandbox: Execute Function or Shell with managed CLIs
Sandbox-->>Executor: Block output
Executor->>Projection: Sanitize traces and model-visible output
Projection-->>Client: Stream projected result
Client->>API: Cancel execution
API->>Queue: Cancel queued or running job
API->>Executor: Signal local or resumed execution
Reviews (14): Last reviewed commit: "run from block ui disabling" | Re-trigger Greptile
|
@cursor review |
|
@cursor review |
|
@cursor review |
…lver # Conflicts: # apps/docs/content/docs/en/workflows/blocks/function.mdx # apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/code/code.tsx # apps/sim/lib/copilot/request/tools/executor.test.ts # apps/sim/tools/generated/tool-metadata.ts
|
bugbot run |
…lver # Conflicts: # packages/db/migrations/meta/0282_snapshot.json # packages/db/migrations/meta/_journal.json
…lver # Conflicts: # apps/sim/lib/copilot/tools/handlers/materialize-file.test.ts # apps/sim/lib/copilot/tools/handlers/materialize-file.ts
|
@cursor review |
|
Too many files changed for review (826 files, 500 file limit). |
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 b6109c4. Configure here.
|
@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 05e6447. Configure here.
…ema (#6323) createTableWriteProvenanceTargets (added in #6247) required every submitted column to translate to exactly one storage id and threw otherwise. The wire translator has always dropped keys naming no column in the schema, so any internal-JWT write carrying such a key threw an uncaught error and surfaced as a 500 — where the same write previously succeeded, since the write path drops the column identically. Give a dropped column a null column id instead of throwing. It still gets a target, so the bundle completeness check that pairs one selection per submitted column is unchanged, but no provenance is recorded for a value that is never stored.
…ion (#6705) Condition expressions pasted every environment variable value into the expression as source. Block references in the same expression go through a proper escape and get quoted; env vars went through neither. That left three defects: - A bare string placeholder was a SyntaxError. `{{NAME}} === 'alice'` resolved to `alice === 'alice'`, so the form the Function block docs recommend could not be used here at all. - Ordinary data broke the block. An apostrophe (`O'Brien`) or a newline in a legitimate value produced unparseable source and failed the run. - The quoted form was injectable. A value of `x' || true || '` turned `'{{NAME}}' === 'bob'` into `'x' || true || '' === 'bob'`, forging a true branch out of a comparison that should be false. Inline only structurally inert literals — numbers, booleans, and null, with optional space/tab padding. Every other value keeps its `{{NAME}}` placeholder and is bound as a string by the execution-boundary compiler, the same one Function blocks and Custom Tools already use. Legacy outcomes are preserved. `{{COUNT}} === 3` and `{{ENABLED}} === true` still compare as literals, and an embedded `"Bearer {{API_KEY}}"` still compares equal — now via compiled concatenation rather than a pasted value. Padding is admitted rather than trimmed so the inlined text stays byte-identical to the stored value, which is what keeps a padded number correct both bare and quoted. A resolved secret also no longer travels to the execution boundary inside the condition source. The one deliberate behavior change: a value whose text is itself a quoted JS literal (a secret stored as `'foo'`, a plausible workaround for the bare-string SyntaxError) now compares as the 5-character string rather than as source. That form is the injectable one, so it cannot be kept. Docs: state the placeholder type contract, which was described mechanically but never in terms of what a reader gets. `{{KEY}}` in Function and Custom Tool code always evaluates to a string, so a bare `if ({{FLAG}})` is always true and a list has to be stored as JSON. This is what a customer hit after the resolver lift in #6247 moved Function blocks off source inlining. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
Type of Change
Testing
Tested manually with @Sg312
Checklist