Commit 838e7e4
committed
fix(workflows): require literal boolean for runtime continue_on_error
Engine was checking `continue_on_error` via truthiness
(`if step_config.get("continue_on_error"):`), which let truthy
non-bool values like the string `"true"` activate the flag at
runtime if validation was skipped. `execute()` does not auto-validate
(documented on the `load_definition` docstring), so a caller bypassing
`validate_workflow()` could see the contract silently violated.
Tighten the runtime check to identity comparison (`is True`) so only
a literal boolean enables the behaviour. Validation continues to
catch the authoring mistake at parse time; this is defense in depth
for the bypass-validation path. Add
`test_engine_ignores_truthy_non_bool_continue_on_error` locking the
contract — feeds `continue_on_error: "true"` (string) through
`execute()` directly and asserts the run halts with
`RunStatus.FAILED`.
Addresses Copilot review feedback on github#2663.1 parent c827f4f commit 838e7e4
2 files changed
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
662 | 672 | | |
663 | 673 | | |
664 | 674 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2410 | 2410 | | |
2411 | 2411 | | |
2412 | 2412 | | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
2413 | 2451 | | |
2414 | 2452 | | |
2415 | 2453 | | |
| |||
0 commit comments