Relationships
#3401 A global argument that evaluates to swamp-namespace expression text is silently dropped, and literal() cannot pass it through
Opened by hammz · 10/13/2026
What happens
A global argument that evaluates to expression text naming a swamp namespace never reaches the method, and for a model whose method arguments merge the global arguments the run succeeds with the argument silently dropped.
Stored definition in models/command/shell/ctl-shell.yaml:
globalArguments:
run: 'echo MSG=$MSG'
env:
MSG: ${{ literal('${{ inputs.version }}') }}swamp behavior run ctl-shell execute exits 0. The Arguments box shows env as the object holding MSG = ${{ inputs.version }}, but stdout is MSG= with nothing after it: the whole env global argument was dropped.
With literal('${{ github.sha }}') in the same place, stdout is MSG=${{ github.sha }} as expected.
Reproduced on release 20261013.200158.0-sha.35be0b9d.
Why
After definition evaluation, containsSwampExpression (src/domain/expressions/swamp_namespaces.ts) reads the produced text as an unresolved swamp expression. In src/domain/models/method_execution_service.ts the merge of global arguments into method arguments skips every global argument for which it is true, and only the Proxy on context.globalArgs raises an error, on access. command/shell reads env from the merged method arguments, so it never touches the Proxy and runs without the variable.
Expected
Two separate things:
- A run should not succeed with a global argument silently removed. design/enablers/expressions.md (the Limitation paragraph under Passing text through with literal()) documents an
Unresolved expression in globalArguments.<field>error for this case. literal()should be able to pass swamp-namespace text such as GitHub Actions${{ inputs.version }}or${{ steps.build.outputs.sha }}through a global argument. Today it cannot, in a stored definition or in a direct step. That needs the value to be recorded as coming fromliteral()so the persist gate in src/libswamp/models/direct_execution.ts and the method-execution guard both leave it alone.
Found while triaging swamp-club#3389, which is scoped to foreign text only.
Open
No activity in this phase yet.
Sign in to post a ripple.