#989 Cancelling or permanently failing a parallel-branch task flips the RUNNING parent workflow_run (trigger update_workflow_run_on_task_failure has no branch exclusion)
Description
EditEARS: When a tools.workflow.execute_branch task reaches state cancelled or failed, the engine shall not change the parent workflow_run status. Reproduced in scratch DB highway_967_scratch (#967 verification, scripts/verify_966_967/teardown_pg_967.py scenario C): parent workflow_run 'running'; jumper cancel_task on one sleeping branch run -> parent workflow_run status 'cancelled', error {'message': 'Task cancelled', 'task_id': <branch task>}. Cause: migration highway_0_0_40 trigger trg_update_workflow_on_task_failure on jumper.t_<queue> copies NEW.state failed/cancelled to workflow_run WHERE status not terminal, using headers.workflow_run_id, with no task_name filter (the r_ trigger sync_workflow_run_from_jumper_run does skip execute_branch). Affected callers: tools.workflow.cancel_branch, wait_for_any_branch / race patterns that cancel losers, a branch exhausting max_attempts (t_ state failed) while the parent still runs. #967 teardown is protected because fail_run flips the parent to failed first and teardown now refuses to run unless the run is already failed. Fix needs a migration (migretti) adding the execute_branch skip.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...