Skip to content

YAML verification: { type: exit_code } with no value fails a passing step (compares "0" vs undefined) #59

Description

@khaliqgant

Summary

In a YAML workflow, an agent step with verification: { type: exit_code } and
no value fails a step that actually succeeded, with:

Verification failed for "draft": recorded exit code "0" did not match "undefined"

The agent exited 0 (success), but because no expected value was supplied the
engine compares "0" against undefined and fails. The natural author intent —
"pass if the step exits 0" — is silently wrong.

Repro

- name: draft
  type: agent
  agent: drafter
  task: |
    ...write out/draft.md...
  verification:
    type: exit_code        # no `value:` -> compares "0" vs undefined -> FAIL

Run → the step runs fine, produces its artifact, exits 0, and the workflow still
reports FAILED at that step.

Fix on the author side: add value: '0'.

Notes

  • The bundled example examples/yaml/fix-dashboard-user-registration.yaml uses
    the same verification: { type: exit_code } (no value) on its agent steps, so
    it presumably hits this too.
  • The TS builder examples write { type: 'exit_code', value: '0' }; the YAML
    path should behave the same when value is omitted.

Expected

verification: { type: exit_code } with no value should default to '0'
(success), OR flows/relayflows validation (--dry-run) should reject the
step up front with a clear "exit_code verification requires a value" error —
never silently fail a passing step at runtime.

Acceptance criteria

  • type: exit_code with no value either defaults to '0' or fails validation
    at --dry-run, with a message naming the fix.
  • The bundled YAML example is updated accordingly.

Context

Hit while preparing a first-run example for a prospect (Altek). relayflows CLI 1.0.6.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions