fix(serializer): validate required fields for blocks without tools#3137
Merged
icecrasher321 merged 1 commit intostagingfrom Feb 5, 2026
Merged
fix(serializer): validate required fields for blocks without tools#3137icecrasher321 merged 1 commit intostagingfrom
icecrasher321 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryFixed serializer validation bug where required fields were not validated for blocks with empty The previous implementation early-returned when
Also includes a minor formatting improvement to show "0ms" instead of "0.00ms" for zero/near-zero durations. Key changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Serializer
participant ValidationLogic
participant BlockConfig
participant ToolRegistry
Client->>Serializer: serializeWorkflow(blocks, validateRequired=true)
Serializer->>Serializer: serializeBlock(block)
Serializer->>Serializer: extractParams(block)
alt validateRequired is true
Serializer->>ValidationLogic: validateRequiredFieldsBeforeExecution(block, blockConfig, params)
ValidationLogic->>BlockConfig: Check if block enabled
alt Block has tools.access
ValidationLogic->>ToolRegistry: getTool(currentToolId)
ToolRegistry-->>ValidationLogic: currentTool
loop For each tool param
ValidationLogic->>ValidationLogic: Check if required & user-only
ValidationLogic->>ValidationLogic: Check visibility via shouldSerializeSubBlock
ValidationLogic->>ValidationLogic: Validate field value
end
end
Note over ValidationLogic: NEW: Secondary validation for blocks without tools
ValidationLogic->>ValidationLogic: Build validatedByTool Set
loop For each subBlock in blockConfig
alt Not validated by tool params
ValidationLogic->>ValidationLogic: Check visibility via shouldSerializeSubBlock
ValidationLogic->>ValidationLogic: Check if required
ValidationLogic->>ValidationLogic: Validate field value
end
end
alt Missing fields found
ValidationLogic-->>Serializer: throw Error(missing fields)
Serializer-->>Client: Error
else All fields valid
ValidationLogic-->>Serializer: validation passed
end
end
Serializer->>Serializer: Continue serialization
Serializer-->>Client: SerializedBlock
|
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.
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
tools.access(e.g., wait block)requiredfields not covered by tool paramsType of Change
Testing
Tested manually
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing
- No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Cursor Bugbot found 1 potential issue for commit 60fcaf5