feat(gatorwalk-factory): check that CEL product references name declared products (swamp-club #2680) #400
Loading…
Reference in a new issue
No description provided.
Delete branch "cue/2680-gatorwalk-factory-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes swamp-club #2680.
A fixed product name in a factory's CEL must now name a declared product of the kind its map holds. This covers
work.bindings, cel gates and a human-approval gate'swhen. A typo now fails when the definition is checked, not as a binding that fails at dispatch or a gate that never passes.artifacts.x,evidence["x"],validations.artifacts.x,validations["evidence"]["x"]) and presence tests (has(...)at any depth,"x" in artifacts). A stage'sresultEvidencecounts as evidence. A name of the other kind gets its own message.artifacts[k]), macros on a map,inon a payload, and payload field paths against payload schemas._lib/engine/cel_refs.tshasproductRefs(ast), which lists{ map, name, use: read | test }.celExpressions(doc)indefinition_schema.tslists every CEL expression by path fromCEL_POSITIONS, so the${{check and this one share one list.CEL_VOCABULARYis fixed. README and DESIGN are updated.All bundled examples and testdata factories pass: the check found 107 references across them, all valid. 604 unit tests pass. The verification attestation is posted for
d5220400. Both reviews passed; their one low finding (optional access.?) doesn't apply, because cel-js 7.6.1 can't parse it.🤖 Generated with Claude Code
A fixed product name in a factory's CEL (work.bindings, cel gates, a human-approval gate's when) must now name a declared product of the kind its map holds, so a typo fails when the definition is checked rather than at dispatch or as a gate that never passes. Reads (artifacts.x, evidence["x"], validations.artifacts.x, validations["evidence"]["x"]) and presence tests (has(...), "x" in artifacts) are both checked; lookups by variable are not. The walk is productRefs in the new _lib/engine/cel_refs.ts, which tells reads from tests, and celExpressions lists every CEL expression by path from CEL_POSITIONS, so the ${{ check and this one share one list. Both are the entry point #2792 will use. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>