Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeszack

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· Shipped 10/27/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) }}
  1. swamp workflow validate → PASSED
  2. swamp workflow run → fails with the overload error above
  3. Changing the version to int(data.latest("sh", "result").version) - 1 makes 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)

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 6 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

10/27/2026, 6:14:09 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack10/27/2026, 5:49:20 PM
Editable. Press Enter to edit.

zack commented 10/27/2026, 6:14:11 PM

Thanks @kagarmoe for reporting this! We shipped: Let data.version() accept a whole-number double version, so data.latest(...).version - 1 and data.listVersions() elements work as version arguments, and refuse a fractional version with a clear error instead of a missing-overload error.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.