fix(executor): prevent raw workflowInput from overwriting coerced start block values#3347
Merged
icecrasher321 merged 1 commit intostagingfrom Feb 26, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
11d8350 to
28d1545
Compare
Contributor
Greptile SummaryThis PR fixes a bug where raw
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[buildStartBlockOutput] --> B[deriveInputFromFormat]
B --> C{hasStructured?}
C -->|Yes| D[coerceValue per field → structuredInput]
C -->|No| E[Pass raw workflowInput through]
D --> F[buildUnifiedStartOutput / buildIntegrationTriggerOutput]
F --> G[Copy structuredInput to output]
G --> H{workflowInput key in structuredKeys?}
H -->|Yes - NEW GUARD| I[Skip — preserve coerced value]
H -->|No| J[Merge workflowInput value into output]
I --> K[Return output]
J --> K
Last reviewed commit: b3687a8 |
Contributor
Additional Comments (1)
|
28d1545 to
9e6c6ec
Compare
9e6c6ec to
c1e64ff
Compare
Collaborator
Author
|
@greptile |
Collaborator
Author
|
@cursor review |
c1e64ff to
539ad3d
Compare
…alues buildUnifiedStartOutput and buildIntegrationTriggerOutput first populate output with schema-coerced structuredInput values (via coerceValue), then iterate workflowInput and unconditionally overwrite those keys with raw strings. This causes typed values (arrays, objects, numbers, booleans) passed to child workflows to arrive as stringified versions. Add a structuredKeys guard so the workflowInput loop skips keys already set by the coerced structuredInput, letting coerceValue's type-aware parsing (JSON.parse for objects/arrays, Number() for numbers, etc.) take effect. Fixes #3105 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
539ad3d to
b3687a8
Compare
Collaborator
Author
|
@cursor review |
Collaborator
Author
|
@greptile |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buildUnifiedStartOutputandbuildIntegrationTriggerOutputfrom overwriting schema-coercedstructuredInputvalues with rawworkflowInputstringsstructuredKeysguard so theworkflowInputloop skips keys already set bycoerceValue, preserving typed values (arrays, objects, numbers, booleans) passed to child workflowsType of Change
Testing
bun run --filter sim test -- executor/utils/start-block.test.ts(11 tests pass)Checklist
Fixes #3105