You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get_workflow_state builds property_changed lookup keys from bare field names, never matching a real rule #2763
Surfaced during independent review of PR #2762 (#2753 — reject a bare property_key on a property_changed trigger at save time). Explicitly out of scope for that PR, filed here as a standalone follow-up.
Problem
get_workflow_state (packages/core/src/playbook/workflow_state.rs) answers "if this node's current state were evaluated right now, which rules would fire?" by looking up candidate rules in the engine's TriggerIndex. For property-key-scoped rules, it builds one lookup key per schema field, using the bare field name:
for field in&s.fields{
keys.push(TriggerKey::NodeEvent{event:NodeEventType::PropertyChanged,node_type: node.node_type.clone(),property_key:Some(field.name.clone()),});}
But every property_changed trigger a Play can now validly register is indexed under a type-namespaced key (<node_type>.<field>, e.g. task.status) — #2753 made this the only accepted spelling at save time, and it was already the only spelling any real PropertyChanged event ever carries. A bare-field lookup key like "status" can therefore never match anything in the trigger index: this branch of get_workflow_state's candidate search is effectively dead code today, and after #2753 it is guaranteed dead (previously it could, by accident, have matched a badly-authored but already-silently-broken bare-key rule; now it can't even do that).
Impact
get_workflow_state's wildcard (property_key: None) lookup still finds any rule with no specific property_key, so a rule scoped to a wildcard is still reported correctly. Only property-key-scopedproperty_changed rules are missed by this specific-field lookup path — such a rule is silently absent from a get_workflow_state response even when its condition would in fact be satisfied right now.
Suggested fix
Build the lookup key as format!("{}.{}", node.node_type, field.name) instead of the bare field.name, matching the namespaced shape trigger_keys_for_graph_event actually indexes under.
Non-goals
Same as #2753: no change to the stored property format or the namespaced event key shape.
Frontend baseline: 256/257 test files passed, 5227/5229 tests passed. 2 pre-existing failures in src/tests/performance/architecture-benchmarks.test.ts (timing-sensitive perf thresholds, unrelated to this issue — bulk structural op took 116.9ms vs 40ms target, render scaling factor 2.44 vs 1.5 max). Starting work on the workflow_state.rs namespaced property-key fix.
Activity
mstomar125 commentedon Sep 21, 2026
Frontend baseline: 256/257 test files passed, 5227/5229 tests passed. 2 pre-existing failures in src/tests/performance/architecture-benchmarks.test.ts (timing-sensitive perf thresholds, unrelated to this issue — bulk structural op took 116.9ms vs 40ms target, render scaling factor 2.44 vs 1.5 max). Starting work on the workflow_state.rs namespaced property-key fix.
Merge inherited fields into get_workflow_state's candidate enumeration (