Skip to content

Commit 62ec537

Browse files
adamiBsTooTallNate
andauthored
fix(world): make run.input and step.input optional on snapshot schemas (vercel#1979)
The World service omits input fields from run/step snapshot responses when payloads are externalized as RemoteRef blobs. Mirrors existing WorkflowRunWithoutData / StepWithoutData types and extends vercel#1939's treatment of output/error/completedAt to input. Fixes WorkflowWorldError schema validation failures on every event acknowledgement after the 2026-05-12 service-side RemoteRef rollout. Fixes vercel#1977. Signed-off-by: Nathan Rajlich <n@n8.io> Co-authored-by: Nathan Rajlich <n@n8.io>
1 parent 234412a commit 62ec537

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@workflow/world": patch
3+
"workflow": patch
4+
---
5+
6+
Make `run.input` and `step.input` `.optional()` on the World snapshot schemas so consumers no longer fail validation when the service externalizes payloads as `RemoteRef` blobs.

packages/world/src/runs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const WorkflowRunBaseSchema = z.object({
4747
// Optional in database for backwards compatibility, defaults to 1 (legacy) when reading
4848
specVersion: z.number().optional(),
4949
executionContext: z.record(z.string(), z.any()).optional(),
50-
input: SerializedDataSchema,
50+
input: SerializedDataSchema.optional(),
5151
output: SerializedDataSchema.optional(),
5252
/**
5353
* The thrown value from a run_failed event, serialized via the workflow

packages/world/src/steps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const StepSchema = z.object({
4444
*/
4545
stepName: z.string(),
4646
status: StepStatusSchema,
47-
input: SerializedDataSchema,
47+
input: SerializedDataSchema.optional(),
4848
output: SerializedDataSchema.optional(),
4949
/**
5050
* The thrown value from a step_retrying or step_failed event, serialized

0 commit comments

Comments
 (0)