Skip to content

Commit c2b23a2

Browse files
committed
fix(workflows): surface dry-run previews on engine exception
When the engine raises mid-run (e.g. template resolution failure), the dry-run previews resolved by earlier steps are the most useful debug signal a user can get. They were being silently dropped because the CLI's exception path bypassed the preview loop. This change: * Engine: attach the partially-populated state to the raised exception as exc.partial_state (mirrors in both execute and resume). * CLI: extract the preview loop into _print_dry_run_previews(state) and call it from both exception handlers when --dry-run is set and --json is not. The --json contract (stdout is a single JSON object) is preserved by skipping the preview print in that branch. * Tests: add test_run_dry_run_prints_previews_on_engine_exception and test_run_dry_run_no_previews_when_json covering the success and --json-failure paths. Addresses review comment 3423394535 on PR #2704.
1 parent affbf5e commit c2b23a2

3 files changed

Lines changed: 2939 additions & 3910 deletions

File tree

0 commit comments

Comments
 (0)