Skip to content

Path-mode fields silently accept {{ template }} syntax and resolve to nothing #58

Description

@pallaoro

What happens

Some node fields are path mode (a dotted state path, digest.summary), while their neighbours are template mode ({{ digest.summary }}). Writing template syntax into a path-mode field passes validation and resolves to undefined at run time, with no error.

Path-mode fields today (src/core/types.ts):

Node Field Neighbour in template mode
agent input task
ai input prompt
code input (run is code)
branch on
loop over

How it bit us

A production flow on a customer box sent its digest through an agent node with input: "{{ digest.summary }}". The agent received no input, replied asking for the text, and sent nothing. Validation, publish and the run all reported success. Authors (human and agent) get this wrong often, because task directly above it takes the braces.

Proposal

  1. Validator: reject, or at least warn, when a path-mode field's value contains {{. Message: "input" takes a state path like "digest.summary", not a template.
  2. Runner, optional: accept {{ path }} in a path-mode field by stripping the braces when the whole value is one expression. Lenient, but removes the trap entirely.
  3. Runner: when a path-mode field is set but resolves to undefined, fail the node (or trace a warning) instead of passing nothing along.

(1) alone would have caught this before publish.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions