Skip to content

Add validation to prevent inputs on trigger-based workflows during serialization#3687

Open
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1769793273-trigger-workflow-inputs-validation
Open

Add validation to prevent inputs on trigger-based workflows during serialization#3687
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1769793273-trigger-workflow-inputs-validation

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Jan 30, 2026

Summary

Adds SDK-side validation during serialization to prevent workflows with non-manual triggers (IntegrationTrigger, ScheduleTrigger) from having workflow inputs defined. This complements the copilot-side change in vellum-ai/vellum-copilot#1556 which prevents the agent builder from generating inputs.py for trigger workflows.

The validation now catches:

  • Pure trigger workflows (only IntegrationTrigger or ScheduleTrigger) with inputs
  • Mixed-trigger workflows (ManualTrigger + non-manual trigger) with inputs

Mixed-trigger workflows are flagged because when executed via the non-manual trigger, inputs won't be populated and can fail at runtime.


Review & Testing Checklist for Human

  • Confirm this doesn't break any existing valid workflows in production that may have mixed triggers with inputs
  • Test end-to-end with agent builder to verify the validation error surfaces correctly when attempting to serialize a trigger workflow with inputs
  • Verify ManualTrigger-only workflows with inputs still serialize without errors

Notes

…rialization

Co-Authored-By: harrison@vellum.ai <harrison.ngo719@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
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

@NgoHarrison NgoHarrison marked this pull request as ready for review January 30, 2026 18:31
@NgoHarrison
Copy link
Copy Markdown
Contributor

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70582907ab

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +354 to +355
has_workflow_inputs = len(self.display_context.workflow_input_displays) > 0
if has_triggers and not has_manual_trigger and has_workflow_inputs:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Catch mixed manual + trigger workflows with inputs

This validation only fires when no ManualTrigger is present, so a workflow that includes both a ManualTrigger and a non‑manual trigger (e.g., IntegrationTrigger) with workflow inputs will pass serialization. For non‑manual trigger executions, StateMeta skips default input population when trigger_attributes is set, so required workflow inputs will be None and any input references can fail at runtime. Because has_manual_trigger short‑circuits the check, the new validation misses this invalid configuration. Consider checking for any non‑manual trigger when inputs exist (e.g., has_non_manual_trigger) to avoid mixed‑trigger workflows silently breaking trigger executions.

Useful? React with 👍 / 👎.

…s with inputs

Co-Authored-By: harrison@vellum.ai <harrison.ngo719@gmail.com>
if has_non_manual_trigger and has_workflow_inputs:
self.display_context.add_validation_error(
WorkflowValidationError(
message="Workflows with non-manual triggers cannot have workflow inputs. "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] would say without any Manual Triggers instead of with non-manual triggers. For instance, a workflow with a Schedule and Manual trigger has non-manual triggers but can have Workflow Inputs.

As well as capitalize Workflow wherever possible

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.

2 participants