You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix!: parse payloads once per boundary (validate on send, transmit original)
Implements D1 from the v8 review remediation spec. Previously both sides
of every payload boundary ran the same Standard Schema and the sender
transmitted the PARSED value; the receiver parsed again, so a transforming
schema (z.coerce.*, .transform(...)) was applied twice — silent data
corruption. Now each boundary parses exactly once, on the receiving side:
the sender still validates (failing early with the existing typed error)
but transmits the caller's ORIGINAL value, discarding the parsed result.
Send-side sites reclassified (validate, transmit original):
- client startWorkflow / executeWorkflow / signalWithStart workflow args
(resolveDefinitionAndValidateInput no longer returns a parsed value)
- client signalWithStart signal args
- client handle signal/query/update proxy inputs (buildValidatedProxy)
- client schedule.create args
- worker workflow-side activity proxy inputs (both throwing and
Result-shaped wrappers in activities-proxy.ts)
- worker child-workflow args (startChildWorkflow / executeChildWorkflow)
- worker continueAsNew args
- worker workflow output (declareWorkflow returns the implementation's
original value after validating it)
- worker activity handler output (declareActivitiesHandler)
- worker query/update handler outputs (bindQueryHandler/bindUpdateHandler)
- worker contract-error data (contractErrorToApplicationFailure details[0])
Receive-side sites confirmed as the single boundary parse (unchanged):
- worker workflow/signal/query/update input handlers, activity handler
input, middleware-substituted inputs (a patched input is raw from the
pipeline's perspective and parsed once)
- client executeWorkflow / handle.result() / query / update result parsing
- worker parent-side child-workflow result parsing, activity-result
parsing in the workflow proxy, contract-error rehydration
Adds transform-schema tests pinning the new wire format at unit level in
both packages plus an end-to-end integration case in the client suite,
and rewrites the old "intentional double-validation" rationale comments.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments