Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublicTeam
Assigneesskunk-ape

Relationships

#2295 Model definitions run inside a workflow reject data.query() and data.findBySpec() in global arguments

Opened by beddari · 9/19/2026· Shipped 9/22/2026

When a workflow model_method step runs a model whose definition has a global argument built from data.query(...) or data.findBySpec(...) (with .filter/.map macros), the step fails with: Model validation failed ... Expression "data.query(...)..." at "globalArguments.nodes" does not contain valid model, self, or env references. Expressions should use: model..resource..., self.globalArguments..., or env.. The same definition evaluates and runs fine with swamp model evaluate and swamp model method run, and a data.latest(...) expression in a sibling global argument passes the workflow validator. Expected: the workflow-path validator accepts every data.* accessor the direct path accepts, or at least data.query and data.findBySpec, since the docs list data.query as the primary accessor. Version 20260918.003339.0-sha.a765b344. Workaround: have the producing model write the list as one resource and read it with data.latest(...).attributes..

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 12 MOREREVIEW+ 27 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/22/2026, 11:54:23 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape assigned skunk-ape9/22/2026, 12:32:48 AM
Editable. Press Enter to edit.

skunk-ape commented 9/22/2026, 11:54:58 PM

Thanks for reporting this, and for describing the workaround you used — writing the list as one resource and reading it back with data.latest was the detail that showed how far the validator had drifted from the namespace. The validator kept its own hand-written accessor list, which is why query and findBySpec were rejected in global arguments long after they worked everywhere else. There is now a single exported constant behind both, pinned by a fitness test to the cel-js registrations and the DataNamespace interface with set equality, so the next accessor added cannot silently fall out of the allow-list. Shipped in PR 2543.

Sign in to post a ripple.