Relationships
#3816 CEL: data.latest(...).version is a double, but data.version() only accepts int, so "version - 1" fails at run time
Opened by kagarmoe · 10/23/2026
Description
In workflow CEL, data.latest(<model>, <dataName>).version evaluates as a double, but data.version(<model>, <dataName>, <version>) only has an int overload. So the natural "previous version" expression fails at run time:
Invalid expression: found no matching overload for 'CelDataNamespace.version(string, string, double)'
> 1 | "echo prev=" + string(data.version("sh", "result", data.latest("sh", "result").version - 1).version)swamp workflow validate passes the workflow, so this only shows up when the step runs. In our case that was a scheduled monitoring assert.
Steps to reproduce
In a repo with a command/shell behavior sh that has run at least twice, give a step this input:
inputs:
run: ${{ "echo prev=" + string(data.version("sh", "result", data.latest("sh", "result").version - 1).version) }}swamp workflow validate→ PASSEDswamp workflow run→ fails with the overload error above- Changing the version to
int(data.latest("sh", "result").version) - 1makes it work (prev=1).
Expected
Data versions are whole numbers, so data.latest(...).version (and other .version fields) should be CEL int. Failing that, data.version() should accept a whole-number double. Ideally validate would also catch the overload mismatch.
Environment
swamp 20261022.211048.0 (Linux, WSL2 Ubuntu 26.04)
Open
No activity in this phase yet.
Sign in to post a ripple.