Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLI
Assigneesstack72

Relationships

#622 workflow validate: resolve model globalArguments expressions against the calling workflow's declared inputs

Opened by 4chems · 6/11/2026· Shipped 6/11/2026

Problem

A model instance can bind a globalArgument to a workflow-input expression in its definition YAML, e.g.:

globalArguments:
  name: ${{ inputs.recordHost }}

swamp workflow validate does not evaluate these expressions against the calling workflow's declared inputs, so a workflow that references this model's methods but declares no recordHost input validates green and then fails at runtime with:

Unresolved expression in globalArguments.name: "${{ inputs.recordHost }}"

The step-input check (#40) already validates the step's own inputs: block against the method's argument schema — but the model's globalArguments expressions are a second, invisible input contract that only surfaces at run time. In practice every calling workflow must know (and match) the exact input name the model definition happens to reference, and nothing catches a mismatch before execution.

Proposed solution

During workflow validate, for each step's target model: scan the model definition's globalArguments (and method-level argument defaults) for ${{ inputs.* }} expressions and verify each referenced input is declared by the calling workflow. Report a failed validation naming the model, the globalArgument, and the missing input — analogous to the existing 'Step inputs' check.

Alternatives considered

  • Documenting the convention per model instance — fragile, and the failure mode (runtime abort mid-workflow, after earlier steps already ran) is expensive for destructive/teardown workflows.
  • Avoiding input expressions in globalArguments entirely and passing values as method arguments — works (we refactored our models this way), but the validator gap remains for any repo still using the documented globalArguments-expression pattern.

Environment

  • swamp 20260610.225536.0-sha.4559c368
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

6/11/2026, 9:03:33 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/11/2026, 8:10:31 PM
Editable. Press Enter to edit.

stack72 commented 6/11/2026, 9:03:43 PM

Thanks @4chems for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.