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
Commit b4309cc
Browse filesBrowse the repository at this point in the historyBrowse files
fix(workflows): evaluate chained comparisons pairwise like Python
The expression evaluator split a comparison at the first operator in
_COMPARISON_OPERATORS table order and evaluated the whole remainder as
the right operand, so a chained comparison such as `0 <= inputs.n <= 10`
became `0 <= (inputs.n <= 10)` — a number compared against a boolean.
Validation accepted the condition and nothing was raised at run time,
so an `if`, `while` or `do-while` step silently took the wrong branch.
Scan the expression left to right for every top-level comparison
operator (longest operator first at each position, with the same
quote/bracket skipping as _find_top_level) and evaluate the chain
pairwise with an implicit `and`, the way Python and Jinja2 chain
comparisons: `0 <= n <= 10` is `0 <= n and n <= 10`. Single
comparisons keep their previous semantics, and every operand is
evaluated before any pair is compared so validation probes visit the
same leaves regardless of which pair fails first.
Fixes#5071
Assisted-by: Claude Code (model: Claude Fable 5, supervised)
0 commit comments