Add validation to raise error when ChatMessageTrigger and entrypoint are both present#3448
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
0b6c2d1 to
b5cef85
Compare
…are both present - Add ChatMessageTrigger to WorkflowTriggerType enum (CHAT_MESSAGE) - Add validation in serialize() to raise WorkflowValidationError when both ChatMessageTrigger and entrypoint nodes are present (mutually exclusive) - Add ChatMessageTrigger handling in _serialize_workflow_trigger() - Add tests for the validation Co-Authored-By: vincent@vellum.ai <0426vincent@gmail.com>
b5cef85 to
489c175
Compare
Contributor
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
vincent0426
approved these changes
Dec 29, 2025
dvargas92495
approved these changes
Dec 30, 2025
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.
Adds validation to raise an error when serializing a workflow that has both a ChatMessageTrigger and an entrypoint node, since they are mutually exclusive.
Summary
CHAT_MESSAGEtoWorkflowTriggerTypeenumserialize()that raisesWorkflowValidationErrorwhen both ChatMessageTrigger and entrypoint nodes are present_serialize_workflow_trigger()to recognize it as a valid trigger typeReview & Testing Checklist for Human
has_chat_message_trigger and needs_entrypoint_node) correctly captures the mutual exclusivity requirement -needs_entrypoint_nodeis true when there's a ManualTrigger, no triggers at all, or non-trigger entrypoint nodes existNotes
The second test (
test_chat_message_trigger_without_entrypoint_does_not_raise_mutual_exclusivity_error) catches aValueErrorand passes - this is due to a pre-existing limitation whereChatMessageTrigger.messageattribute has a complex union type that can't be serialized byprimitive_type_to_vellum_variable_type. The test still validates that the mutual exclusivity error is not raised for valid ChatMessageTrigger-only workflows.