Skip to main content
← Back to list
01Issue
BugOpenSwamp CLIPublic
AssigneesNone

Relationships

#3832 workflow validate reports a string-form dependsOn as an [FTL] error with a zod stack trace, not a validation failure

Opened by reset · 10/23/2026

On 20261020.024627.0-sha.26dc044f (macOS 27), a step with dependsOn: [host, disk] (the string shorthand) makes swamp workflow validate probe exit 1 with:

[FTL] error: Error: Step "example": dependsOn entries must be objects, not strings. followed by the corrective block (Replace: dependsOn: - host With: dependsOn: - step: host condition: type: succeeded) and then a stack trace: at Object.rejectStringStepDependsOn [as transform] (.../src/domain/workflows/step.ts:91:15) and nine zod 4.4.3 frames (v4/classic/schemas.js:1084, v4/core/schemas.js:1962, handlePipeResult, ...). swamp workflow validate probe --json prints {"error": "Step \"example\": dependsOn entries must be objects, not strings. ...", "stack": " at Object.rejectStringStepDependsOn ..."} rather than the structured validation result other validate failures return.

Expected: validate lists the step and the corrective text as an ordinary validation error, exit 1, no [FTL], no stack; --json returns the same structured result as other validation failures. Actual: the message is right but is surfaced as a fatal crash with a stack trace in both output modes.

Steps to reproduce:

  1. swamp repo init --tool none in an empty workspace.
  2. swamp workflow create probe.
  3. In workflows/workflow-probe.yaml change the step's dependsOn: [] to dependsOn: [host, disk].
  4. swamp workflow validate probe and swamp workflow validate probe --json.

#3062 (shipped) replaced raw Zod issue dumps with readable messages; this path is different: rejectStringStepDependsOn in src/domain/workflows/step.ts:91 throws a plain Error inside a zod transform, so it escapes the ZodError formatting and reaches the top-level fatal handler (cause is inference from the stack).

Suggestion: raise the string-form rejection as a zod issue (ctx.addIssue) or catch it at the workflow load boundary like the other schema errors, so validate and run report it the same way without a stack.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

10/23/2026, 5:21:39 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.