feat(execution): payload size bottlenecks with lazy execution value hydration, safer materialization, and batched parallel execution#4560
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Introduces lazy materialization for JS isolated-vm Functions. The function execute API wires new Implements batched Parallel execution. Parallel subflows gain Docs/SDK references updated. Async execution docs and SDK examples switch from Reviewed by Cursor Bugbot for commit f9d4725. Configure here. |
Greptile SummaryThis PR introduces lazy large-value hydration for isolated-VM JavaScript execution, a new
Confidence Score: 4/5The core parallel batching and serializer pipeline are well-structured, but the The apps/sim/app/api/function/execute/route.ts (sim.values.read broker handler) and apps/sim/executor/execution/state.ts (accumulatedOutputs type definition) Important Files Changed
Sequence DiagramsequenceDiagram
participant Executor
participant Serializer
participant Store
participant Cache
participant Storage
participant FunctionRoute
participant IVMWorker
participant Broker
Executor->>Serializer: compactExecutionPayload(blockOutput)
Serializer->>Store: storeLargeValue(value, json, size, ctx)
Store->>Storage: persistValue(id, json) key
Store->>Cache: cacheLargeValue(id, value, size, ctx)
Store-->>Serializer: LargeValueRef
Serializer-->>Executor: compacted output with LargeValueRef
Executor->>Executor: resolveCodeWithContextVars()
Note over Executor: LargeValueRef found - lazy injection
Executor->>FunctionRoute: POST /api/function/execute with contextVariables
FunctionRoute->>IVMWorker: executeInIsolatedVM with brokers
IVMWorker->>IVMWorker: user code calls await sim.values.read(ref)
IVMWorker->>Broker: IPC broker message sim.values.read
Broker->>Storage: readLargeValueRefFromStorage(ref)
Storage-->>Broker: materialised value
Broker-->>IVMWorker: IPC brokerResponse
IVMWorker-->>FunctionRoute: execution result
|
|
@greptile |
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes 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 f9d4725. Configure here.
|
@greptile |
|
@greptile |
|
@greptile |

Summary
Type of Change
Testing
Tested manually
Checklist