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:
swamp repo init --tool nonein an empty workspace.swamp workflow create probe.- In
workflows/workflow-probe.yamlchange the step'sdependsOn: []todependsOn: [host, disk]. swamp workflow validate probeandswamp 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.
Open
No activity in this phase yet.
Sign in to post a ripple.