Delay pending cleanup until task aborts (#14000)
## Summary - move interrupted-turn cleanup so running tasks are aborted before pending approvals are cleared - keep unified exec shutdown behavior unchanged ## Why this fixes the flake The interrupted-turn path could clear pending approvals before the in-flight task had observed cancellation. On slower runners that let an approval wait resolve in between those steps, tests would sometimes surface a model-visible rejection instead of the expected TurnAborted flow. Draining the active turn first and only then clearing pending approval state makes the abort ordering deterministic.
This commit is contained in:
parent
566e4cee4b
commit
79307b7933