Skip to content

Commit 0473322

Browse files
committed
improvement(naming): rename sandbox-tasks to sandboxes and drop folder-name stutter in execution files
1 parent 6b0c69e commit 0473322

62 files changed

Lines changed: 84 additions & 94 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/add-managed-cli/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Read these live sources before editing; do not copy their current entries into t
1515
2. `apps/sim/lib/execution/remote-sandbox/cli-tools.server.ts` — server-only recipes and recipe helpers.
1616
3. `apps/sim/lib/execution/remote-sandbox/cli-tools.test.ts` — catalog and supply-chain invariants.
1717
4. `apps/sim/lib/execution/remote-sandbox/cli-tools-boundary.test.ts` — client/server import boundary.
18-
5. `apps/sim/lib/execution/remote-sandbox/sandbox-spec.ts` — content-addressed hash inputs.
18+
5. `apps/sim/lib/execution/remote-sandbox/spec.ts` — content-addressed hash inputs.
1919

2020
Read `resolve.ts` and `e2b.ts` only when changing provisioning mechanics. A normal catalog addition should not require UI, API, database, resolver, or provider edits; those paths derive from the registries.
2121

@@ -114,7 +114,7 @@ Never commit downloaded artifacts or credentials.
114114
bun run --cwd apps/sim test \
115115
lib/execution/remote-sandbox/cli-tools.test.ts \
116116
lib/execution/remote-sandbox/cli-tools-boundary.test.ts \
117-
lib/execution/remote-sandbox/sandbox-spec.test.ts \
117+
lib/execution/remote-sandbox/spec.test.ts \
118118
lib/execution/remote-sandbox/resolve.test.ts \
119119
'app/workspace/[workspaceId]/settings/components/sandboxes/utils.test.ts'
120120
```

‎.claude/rules/sim-sandbox.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ paths:
44
- "apps/sim/lib/execution/isolated-vm-worker.cjs"
55
- "apps/sim/lib/execution/isolated-vm.ts"
66
- "apps/sim/lib/execution/sandbox/**"
7-
- "apps/sim/sandbox-tasks/**"
7+
- "apps/sim/sandboxes/**"
88
---
99

1010
# Sim Sandbox — Worker Security Policy
@@ -40,7 +40,7 @@ about what must **never** live in that process.
4040
validation.
4141

4242
4. **Nothing that runs in the isolate is trusted, even if we wrote it**. The
43-
task `bootstrap` and `finalize` strings in `apps/sim/sandbox-tasks/` execute
43+
task `bootstrap` and `finalize` strings in `apps/sim/sandboxes/` execute
4444
inside the isolate. They must treat `globalThis` as adversarial — no pulling
4545
values from it that might have been mutated by user code. The hardening
4646
script in `executeTask` undefines dangerous globals before user code runs.

‎.cursor/rules/sim-sandbox.mdc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: "Isolated-vm sandbox worker security policy. Hard rules for anything that lives in the worker child process that runs user code."
3-
globs: ["apps/sim/lib/execution/isolated-vm-worker.cjs","apps/sim/lib/execution/isolated-vm.ts","apps/sim/lib/execution/sandbox/**","apps/sim/sandbox-tasks/**"]
3+
globs: ["apps/sim/lib/execution/isolated-vm-worker.cjs","apps/sim/lib/execution/isolated-vm.ts","apps/sim/lib/execution/sandbox/**","apps/sim/sandboxes/**"]
44
---
55

66
<!-- Generated from .claude/rules/sim-sandbox.md by `bun run skills:sync`. Edit the source, not this file. -->
@@ -38,7 +38,7 @@ about what must **never** live in that process.
3838
validation.
3939

4040
4. **Nothing that runs in the isolate is trusted, even if we wrote it**. The
41-
task `bootstrap` and `finalize` strings in `apps/sim/sandbox-tasks/` execute
41+
task `bootstrap` and `finalize` strings in `apps/sim/sandboxes/` execute
4242
inside the isolate. They must treat `globalThis` as adversarial — no pulling
4343
values from it that might have been mutated by user code. The hardening
4444
script in `executeTask` undefines dangerous globals before user code runs.

‎apps/sim/app/api/workflows/[id]/execute/route.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import { afterAll, beforeEach, describe, expect, it, vi } from 'vitest'
5252
import type { AuthResult } from '@/lib/auth/hybrid'
5353
import { AsyncJobEnqueueError } from '@/lib/core/async-jobs/types'
5454
import { getRemainingExecutionMs } from '@/lib/core/execution-limits'
55-
import { INTERNAL_EXECUTION_DEADLINE_HEADER } from '@/lib/execution/execution-deadline-header'
55+
import { INTERNAL_EXECUTION_DEADLINE_HEADER } from '@/lib/execution/deadline-header'
5656
import {
5757
abortManualExecution,
5858
registerManualExecutionAborter,

‎apps/sim/app/api/workflows/[id]/execute/route.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ import {
5050
SIM_VIA_HEADER,
5151
validateCallChain,
5252
} from '@/lib/execution/call-chain'
53+
import {
54+
INTERNAL_EXECUTION_DEADLINE_HEADER,
55+
parseExecutionDeadlineHeader,
56+
} from '@/lib/execution/deadline-header'
5357
import {
5458
createExecutionEventWriter,
5559
flushExecutionStreamReplayBuffer,
@@ -58,10 +62,6 @@ import {
5862
setExecutionActiveBlockStarts,
5963
type TerminalExecutionStreamStatus,
6064
} from '@/lib/execution/event-buffer'
61-
import {
62-
INTERNAL_EXECUTION_DEADLINE_HEADER,
63-
parseExecutionDeadlineHeader,
64-
} from '@/lib/execution/execution-deadline-header'
6565
import {
6666
registerManualExecutionAborter,
6767
unregisterManualExecutionAborter,

‎apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ vi.mock('@/lib/execution/event-buffer', () => ({
1919
readExecutionMetaState: mockReadExecutionMetaState,
2020
}))
2121

22-
vi.mock('@/lib/execution/execution-signal', () => ({
22+
vi.mock('@/lib/execution/signal', () => ({
2323
getExecutionSignalHub: () => ({ subscribe: mockSubscribe }),
2424
}))
2525

‎apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
readExecutionEventsState,
1515
readExecutionMetaState,
1616
} from '@/lib/execution/event-buffer'
17-
import { type ExecutionSignalReason, getExecutionSignalHub } from '@/lib/execution/execution-signal'
17+
import { type ExecutionSignalReason, getExecutionSignalHub } from '@/lib/execution/signal'
1818
import {
1919
type ExecutionEvent,
2020
formatSSEEvent,

‎apps/sim/blocks/blocks/function.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { CodeIcon } from '@/components/icons'
22
import { getDeploymentShape } from '@/lib/core/config/deployment-shape'
33
import { CodeLanguage, getLanguageDisplayName } from '@/lib/execution/languages'
4-
import { SANDBOX_OUTPUT_DIR } from '@/lib/execution/remote-sandbox/sandbox-paths'
4+
import { SANDBOX_OUTPUT_DIR } from '@/lib/execution/remote-sandbox/paths'
55
import type { BlockConfig } from '@/blocks/types'
66

77
export const FunctionBlock: BlockConfig = {

‎apps/sim/lib/api/contracts/hotspots.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { defineRouteContract } from '@/lib/api/contracts/types'
1010
import { DEFAULT_CODE_LANGUAGE } from '@/lib/execution/languages'
1111
import { PRIVATE_SECRET_PROVENANCE_FIELD } from '@/lib/execution/private-tool-metadata'
12-
import { MAX_BLOCK_MOUNTED_FILES } from '@/lib/execution/remote-sandbox/sandbox-paths'
12+
import { MAX_BLOCK_MOUNTED_FILES } from '@/lib/execution/remote-sandbox/paths'
1313
import { MAX_FUNCTION_CODE_LENGTH } from '@/lib/function-execution/limits'
1414
import {
1515
MAX_PII_VALIDATION_DETECTED_ENTITIES,

‎apps/sim/lib/execution/cancellation.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const {
2121

2222
const mockGetRedisClient = redisConfigMockFns.mockGetRedisClient
2323

24-
vi.mock('@/lib/execution/execution-signal', () => ({
24+
vi.mock('@/lib/execution/signal', () => ({
2525
getExecutionSignalChannel: (executionId: string) => `execution:signal:${executionId}`,
2626
getExecutionSignalHub: () => ({ subscribe: mockSignalSubscribe }),
2727
LEGACY_EXECUTION_CANCEL_CHANNEL: 'execution:cancel',

0 commit comments

Comments
 (0)