docs(prds): resolve data-flow/condition syntax as CEL (open question 1)
CEL (cel.dev/cel-go, pinned v0.32.0) is the single expression mechanism covering both an action's `when` condition and its `args` values, evaluated against a read-only context (`event`, `actions.<id>.result`). Rejects the custom-gate precedent (Yaegi-in-YAML) as inverting the design's own "YAML is data, Yaegi is logic" premise. Expressions compile/type-check at playbook load, consistent with the existing collision-handling reject-at-load rule; generated Module Result schemas become CEL type declarations so result-path typos reject at load too. Vetted against expr-lang/expr, gval, govaluate (archived), starlark-go: CEL wins on structural safety (non-Turing-complete, CostLimit-bounded, error values not panics, zero security advisories on record) despite the largest binary cost (+13MB) of the candidates -- accepted because the alternative is re-implementing CEL's type-checker on a bespoke grammar for the same guarantee. Sign-off (Sam, 2026-09-03): all judgment calls (J1-J5) accepted as proposed, including J2's per-value CEL-literal quoting cost and the +13MB binary size trade. Cross-references in module-position.md updated to point at this resolution instead of citing open question 1 as unresolved.
This commit is contained in:
1 parent
eea0544ee6
commit
7282afc9f5
2 files changed
+278
-9
No files matched your search
@@ -193,11 +193,11 @@ wired in bootstrap.go with log-and-abort on load failure.
|
||||
|
||||
Playbook YAML action dispatch is **deliberately out of this slice**: a
|
||||
minimal 'run this one module action, no chaining' dispatch still requires
|
||||
naming how `args` values reach the action (parent doc open question 1
|
||||
-- data-flow/interpolation syntax) and what the result feeds. Both are
|
||||
unresolved in the parent doc; claiming them here would half-answer a
|
||||
question the design explicitly defers. Dispatch is a follow-up ticket
|
||||
that lands once Q1 is answered, and it will consume this registry as-is.
|
||||
the parent doc's data-flow mechanism (now resolved: CEL expressions
|
||||
over an evaluation context -- see eda-playbook-engine.md's resolved open
|
||||
question 1) and what the result feeds. Dispatch is a follow-up ticket
|
||||
that lands once the coordinator exists, and it will consume this
|
||||
registry as-is.
|
||||
|
||||
## Open questions
|
||||
|
||||
@@ -213,7 +213,8 @@ that lands once Q1 is answered, and it will consume this registry as-is.
|
||||
subtypes) should be confirmed against `organisation.md`'s file-layout
|
||||
rule before the first slice starts.
|
||||
3. **Result surfacing.** A Module's `Result` needs to reach later actions
|
||||
in the same playbook once data-flow (parent doc's open question 1) is
|
||||
designed -- this doc does not attempt that, but the `map[string]any`
|
||||
result shape above should stay compatible with whatever that
|
||||
mechanism turns out to be.
|
||||
in the same playbook once data-flow is designed -- resolved in the
|
||||
parent doc as CEL expressions over `actions.<id>.result.<field>` (see
|
||||
eda-playbook-engine.md's resolved open question 1); the `map[string]any`
|
||||
result shape above is what the evaluation context exposes, so it stays
|
||||
compatible by construction.
|
||||
Reference in new issue
Block a user