Follow-up to #175 (crucible simulate).
#175 ships per-guard verdict seeding (-guard name=true/false, default false) so guarded transitions can be driven headlessly without Go bindings. That covers Go-func guards, but it's a manual verdict, not real evaluation.
For IRs whose guards carry CEL expressions (state/expr), simulate could instead evaluate guards live against a user-supplied context:
crucible simulate machine.json -events "checkout,paid" -context '{"items": 3, "paid": true}'
This would wire a celGuard per CEL-authored guard, project the supplied JSON context through the machine's ContextSchema activation, and resolve guarded transitions from real data instead of seeded verdicts.
Scope notes:
- Only helps guards authored as CEL expressions; Go-func guards still need
-guard seeding.
- Requires schema detection on the loaded IR and the
state/expr dependency in cmd/crucible.
-guard overrides and -context should compose (explicit -guard wins).
Follow-up to #175 (
crucible simulate).#175 ships per-guard verdict seeding (
-guard name=true/false, default false) so guarded transitions can be driven headlessly without Go bindings. That covers Go-func guards, but it's a manual verdict, not real evaluation.For IRs whose guards carry CEL expressions (
state/expr),simulatecould instead evaluate guards live against a user-supplied context:This would wire a
celGuardper CEL-authored guard, project the supplied JSON context through the machine'sContextSchemaactivation, and resolve guarded transitions from real data instead of seeded verdicts.Scope notes:
-guardseeding.state/exprdependency incmd/crucible.-guardoverrides and-contextshould compose (explicit-guardwins).