eda: evaluate action args as CEL expressions (J2) #450

Closed
opened 2026-10-27 13:36:22 +00:00 by sam · 0 comments
Owner

Unshipped half of docs/prds/playbook-expression-syntax.md (J2). Found while
deciding whether that PRD could move from Approved to Finalised.

J2 decides: every args value is evaluated as a CEL expression. There is no
split between literal args and expression args -- a plain string is a CEL
string literal, a number is a CEL number literal, and any value reading
context data is written in CEL. One mechanism, no interpolation marker. The
accepted cost is that CEL string literals must be quoted inside YAML
(message: '"build finished"').

args does not exist anywhere in internal/domain/eda/playbook. It only
becomes meaningful once a non-workflow position ships, since a workflow-kind
action names a workflow and takes no arguments.

The expression environment itself (compile at load, evaluate at dispatch,
cost limit) shipped in archie-core-t2db.14 and is reused unchanged.

Design

Blocked by .25 (ids) and .24 (ledger). Do not start before both land: args
only become meaningful on a non-workflow position, and a workflow-kind action
names a workflow and takes no arguments.

The expression environment is done (archie-core-t2db.14): compile at load,
evaluate at dispatch, cost limit DefaultCostLimit = 100_000 matching the PRD's
J5. This bead reuses it unchanged and adds the args field, its compile at
load, and its evaluation before the action is invoked.

SCOPED GATE COMMAND
go test ./internal/domain/eda/... -count=1 && go vet ./internal/domain/eda/...

Acceptance criteria

A playbook action's args values are compiled as CEL at load and evaluated against the dispatch context before the action is invoked; a syntax or type error in an args value fails the load.

Close reason

Shipped. Args are CEL expressions: compileArgs compiles every args value at load (J2: the YAML scalar IS the CEL source), evalArgs evaluates them at dispatch, and run.go passes the evaluated map to modules.Invoke. Verified: the args compile/eval and Run suites in internal/domain/eda/playbook.


Imported from beads archie-core-t2db.26 · GitHub #1128 · type task · priority P2 · created 2026-09-21 · closed 2026-09-29

Unshipped half of docs/prds/playbook-expression-syntax.md (J2). Found while deciding whether that PRD could move from Approved to Finalised. J2 decides: every `args` value is evaluated as a CEL expression. There is no split between literal args and expression args -- a plain string is a CEL string literal, a number is a CEL number literal, and any value reading context data is written in CEL. One mechanism, no interpolation marker. The accepted cost is that CEL string literals must be quoted inside YAML (message: '"build finished"'). `args` does not exist anywhere in internal/domain/eda/playbook. It only becomes meaningful once a non-workflow position ships, since a workflow-kind action names a workflow and takes no arguments. The expression environment itself (compile at load, evaluate at dispatch, cost limit) shipped in archie-core-t2db.14 and is reused unchanged. ### Design Blocked by .25 (ids) and .24 (ledger). Do not start before both land: args only become meaningful on a non-workflow position, and a workflow-kind action names a workflow and takes no arguments. The expression environment is done (archie-core-t2db.14): compile at load, evaluate at dispatch, cost limit DefaultCostLimit = 100_000 matching the PRD's J5. This bead reuses it unchanged and adds the args field, its compile at load, and its evaluation before the action is invoked. SCOPED GATE COMMAND go test ./internal/domain/eda/... -count=1 && go vet ./internal/domain/eda/... ### Acceptance criteria A playbook action's args values are compiled as CEL at load and evaluated against the dispatch context before the action is invoked; a syntax or type error in an args value fails the load. ### Close reason Shipped. Args are CEL expressions: compileArgs compiles every args value at load (J2: the YAML scalar IS the CEL source), evalArgs evaluates them at dispatch, and run.go passes the evaluated map to modules.Invoke. Verified: the args compile/eval and Run suites in internal/domain/eda/playbook. --- _Imported from beads `archie-core-t2db.26` · GitHub #1128 · type task · priority P2 · created 2026-09-21 · closed 2026-09-29_
sam added the mediumtask labels 2026-10-27 13:36:22 +00:00
sam self-assigned this 2026-10-27 13:36:22 +00:00
sam closed this issue 2026-10-27 13:36:22 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#450