Skip to content

Validate that required node input fields have incoming edges #95

@xujustinj

Description

@xujustinj

Summary

During Workflow.validate(), we validate edge type compatibility but do not validate that every required input field on a node has a corresponding incoming edge. This means a node can be scheduled with {} input even when its input_type has required fields — the workflow only fails later at runtime during _cast_input() / model_validate().

Proposal

Add a validation step in Workflow.validate() that checks, for each non-input node, that every required field in its input_type has at least one incoming edge in edges_by_target.

This would catch misconfigured workflows at validation time rather than at runtime.

Notes

  • This was never validated before — it's a new validation, not a regression.
  • Surfaced by Copilot review on Contextual types #94.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions