Repository navigation
Commit dd84e04
committed
fix(workflows): evaluate parenthesised expressions
The operator scans in _evaluate_simple_expression skip over bracketed
text, so an operator inside a nested operand is never split on. Nothing
then unwrapped a group spanning the whole expression: `(a or b) and c`
split at the top-level `and`, evaluated `(a or b)` as a dot path, found
no such key, and got None. The `or` was never evaluated and the
expression read false.
So adding parentheses to make precedence explicit — the usual reason to
add them — silently inverted the result: `inputs.a or inputs.b and
inputs.c` was true while `(inputs.a or inputs.b) and inputs.c` was
false. A step gated on such a condition is skipped with nothing reported;
the malformed-condition validators do not flag it, because the syntax is
valid.
Unwrap a group that spans the whole expression, quote-aware and only when
the opening paren closes at the very end, so `(a) and (b)` and a literal
paren inside a string are untouched.1 parent 8d3f64c commit dd84e04
2 files changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
555 | 580 | | |
556 | 581 | | |
557 | 582 | | |
| |||
573 | 598 | | |
574 | 599 | | |
575 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
576 | 611 | | |
577 | 612 | | |
578 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1003 | 1003 | | |
1004 | 1004 | | |
1005 | 1005 | | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1006 | 1033 | | |
1007 | 1034 | | |
1008 | 1035 | | |
| |||
0 commit comments