eda: reject an args value whose CEL type mismatches the kind's Args field at load #457

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

nx30's design (docs/prds/multi-action-playbooks.md) lists 'args that do not type-check against the kind's Args schema' as a load failure, but the shipped loader compares arg KEY names only (validateArgsKeys); a value like args: {message: '123'} loads and fails later at module decode (module decodeLogArgs: 'args.message is int, want string'). Implementing it needs expr to expose the compiled program's static output type and a mapping from the kind's Args field types to CEL types, plus a decision on how to treat dyn reads (event.title into a string field). Raised by the nx30 review (scope/invariant/contract/tests all flagged it).

Close reason

Shipped. checkArgType in internal/domain/eda/playbook rejects an args value whose checked CEL type cannot fill the kind Args field it names, at load, naming the playbook, action and key. Verified: the compileArgs/args-key table tests pass, including the type-mismatch cases.


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

nx30's design (docs/prds/multi-action-playbooks.md) lists 'args that do not type-check against the kind's Args schema' as a load failure, but the shipped loader compares arg KEY names only (validateArgsKeys); a value like args: {message: '123'} loads and fails later at module decode (module decodeLogArgs: 'args.message is int, want string'). Implementing it needs expr to expose the compiled program's static output type and a mapping from the kind's Args field types to CEL types, plus a decision on how to treat dyn reads (event.title into a string field). Raised by the nx30 review (scope/invariant/contract/tests all flagged it). ### Close reason Shipped. checkArgType in internal/domain/eda/playbook rejects an args value whose checked CEL type cannot fill the kind Args field it names, at load, naming the playbook, action and key. Verified: the compileArgs/args-key table tests pass, including the type-mismatch cases. --- _Imported from beads `archie-core-t2db.32` · GitHub #1105 · type task · priority P2 · created 2026-09-21 · closed 2026-09-29_
sam added the mediumtask labels 2026-10-27 13:36:24 +00:00
sam self-assigned this 2026-10-27 13:36:24 +00:00
sam closed this issue 2026-10-27 13:36:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#457