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
automation: flow conditions on numeric string-serialized fields (rating/currency/percent) fault under strict CEL and silently dead-end the flow (sibling of #1530) #1534
Record-change flow decision / edge conditions that compare a numeric field against a literal (e.g. record.rating >= 4, record.amount > 100000) fault at runtime whenever the field's value serializes as a string — Field.rating(allowHalf) → "5.0", Field.currency(scale) → "250000.00", Field.percent likewise. Strict CEL raises no such overload: dyn<string> >= int, so the comparison can never be satisfied. Two compounding defects:
Build vs runtime mismatch (false green). The ADR-0032 §1a build validator accepts record.rating >= 4 (treats rating as numeric per schema) and objectstack build passes. At runtime the bound value is a string and the comparison faults.
Probe inside evaluateCondition for a hot-lead insert (rating = 5):
[PROBE-CEL] expr=`record.rating >= 4` ok=false value=undefined
err=no such overload: dyn<string> >= int
ratingVal="5.0" ratingType=string
The record-change handler fired (handler invoked → callback completed), but next_followup_date was never stamped — routing dead-ended at the decision node.
Affected fields / flows (hotcrm, but the pattern is generic)
Field.rating(allowHalf) → lead routing decision on record.rating >= 4
#1530 is the date / formula-field variant (raw string dates vs CEL Timestamp, swallowed to null in objectql applyFormulaPlan). This issue is the numeric / flow-condition variant in service-automationevaluateCondition, with an extra failure mode: instead of swallow-to-null, the decision silently dead-ends the whole flow. Same ADR-0032 §1c hydration gap — please consider fixing both projection paths (objectql formula + automation condition) consistently.
Workaround (app side)
Cast in the condition: double(record.rating) >= 4, double(record.amount) > 100000. (Applied in hotcrm.)
And/or: a faulting decision/edge condition should not silently dead-end — surface it as an attributed error (ties into the CLI logger / "fail loudly" gap) rather than "no edge matched".
Activity
fix(formula): hydrate string-serialized numeric fields in CEL compari…