Skip to content

CLI playground --mock mode output doesn't match node schemas #62

Description

@jetpham

So if you're running mock mode like node packages/playground/dist/index.js run end --mock --input '{"message":"done"}' or `jam run end --mock --input '{"message":"done"}' you basically get:

Input:
{
  "message": "done"
}

✓ Success!

Output:
{
  "terminated": true,
  "reason": "Workflow completed successfully"
}

I also tried node packages/playground/dist/index.js run delay --mock --input '{"durationMs":1000}' or jam run delay --mock --input '{"durationMs":1000}' and got:

Input:
{
  "durationMs": 1000
}

✓ Success!

Output:
{
  "delayed": true,
  "delayMs": 1000
}

This might seem fine, but the problem is that these outputs do not match the real node output schemas.

For end, the actual schema/executor expect:

{
  completed: boolean,
  message?: string
}

and for delay it should be:

{
  waited: boolean,
  actualDurationMs: number,
  message?: string
}

This led me to find out that all of the mock mode node behavior's output schemas are hard coded in with the incorrect schemas. From what I can tell end, delay, map, filter, http_request, reddit_monitor, twitter_monitor, social_keyword_generator, and draft_emails are all using incorrect schemas.

This is most certainly not supposed to be happening and should be upated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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