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
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".
Summary
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.percentlikewise. Strict CEL raisesno such overload: dyn<string> >= int, so the comparison can never be satisfied. Two compounding defects:record.rating >= 4(treatsratingas numeric per schema) andobjectstack buildpasses. At runtime the bound value is a string and the comparison faults.@objectstack/service-automationevaluateCondition(CEL branch) binds the raw row into the CEL activation — the same un-hydrated-value root cause as Date-typed formula fields always evaluate to null — objectql applyFormulaPlan binds raw string values + silently swallows the CEL type fault (ADR-0032 §1c) #1530, but in the automation path rather than objectqlapplyFormulaPlan. When a decision node's outgoing conditional edges all fault,traverseNextmatches no edge → the flow reports success with no node after the decision executed (noupdate_record, nonotify, no error surfaced).Version
@objectstack/*7.6.0.Evidence
Probe inside
evaluateConditionfor a hot-lead insert (rating = 5):The record-change handler fired (
handler invoked→callback completed), butnext_followup_datewas never stamped — routing dead-ended at the decision node.Affected fields / flows (hotcrm, but the pattern is generic)
Field.rating(allowHalf)→ lead routing decision onrecord.rating >= 4Field.currency(scale)→ opportunity approval start/decision onrecord.amount > 100000,oppRecord.amount > 500000Field.percentwould behave the sameRelationship to #1530
#1530 is the date / formula-field variant (raw string dates vs CEL
Timestamp, swallowed tonullin objectqlapplyFormulaPlan). This issue is the numeric / flow-condition variant inservice-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.)Suggested fix
rating/currency/percentbind as numbers.Found while upgrading objectstack-ai/hotcrm to 7.6 (objectstack-ai/hotcrm#365).