Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

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

  • Added CHAT_MESSAGE to WorkflowTriggerType enum
  • Added validation in serialize() that raises WorkflowValidationError when both ChatMessageTrigger and entrypoint nodes are present
  • Added ChatMessageTrigger handling in _serialize_workflow_trigger() to recognize it as a valid trigger type

Review & Testing Checklist for Human

  • Verify the validation condition (has_chat_message_trigger and needs_entrypoint_node) correctly captures the mutual exclusivity requirement - needs_entrypoint_node is true when there's a ManualTrigger, no triggers at all, or non-trigger entrypoint nodes exist
  • Verify the error message is clear and actionable for users
  • Test by creating a workflow with ChatMessageTrigger + a separate subgraph with an entrypoint and attempting to push it

Notes

The second test (test_chat_message_trigger_without_entrypoint_does_not_raise_mutual_exclusivity_error) catches a ValueError and passes - this is due to a pre-existing limitation where ChatMessageTrigger.message attribute has a complex union type that can't be serialized by primitive_type_to_vellum_variable_type. The test still validates that the mutual exclusivity error is not raised for valid ChatMessageTrigger-only workflows.

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vincent0426 vincent0426 marked this pull request as ready for review December 29, 2025 17:57
@devin-ai-integration devin-ai-integration bot force-pushed the devin/1766512377-chat-message-trigger-entrypoint-validation branch from 0b6c2d1 to b5cef85 Compare December 29, 2025 17:59
…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>
@devin-ai-integration devin-ai-integration bot force-pushed the devin/1766512377-chat-message-trigger-entrypoint-validation branch from b5cef85 to 489c175 Compare December 29, 2025 18:02
@vellum-ai vellum-ai deleted a comment from chatgpt-codex-connector bot Dec 29, 2025
@vincent0426
Copy link
Contributor

@codex review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants