Skip to content

Support partial node validation with structured errors #98

@xujustinj

Description

@xujustinj

Problem

The workflow engine currently validates node structure (schema conformance) but does not validate whether node parameters reference valid resources. For example, an AgentMessage node can have a null agent_id and pass validation — the error only surfaces at runtime when the node tries to resolve the agent.

Proposed Solution

The engine should support a partial validation step that:

  1. Allows nodes to declare resource-type parameters (already hinted at by x-resource-type in JSON schema extras)
  2. Produces structured per-node validation errors (e.g., { node_id, param, error: "missing_resource" }) without requiring full execution
  3. Exposes this via a validate_resources(workflow, context) method that consumers can call before execution

This would let frontends (and API callers) get a precise list of "this workflow can't run because node X is missing resource Y" without hardcoding knowledge of which node types have which resource params.

Current Workaround

The AceTeam frontend hardcodes a set of known agent-node types and checks for null agent_id in the workflow editor before allowing execution. This is tracked inline with a reference to this issue.


Generated by Claude

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