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:
Ahmed Ibrahim 2026-03-09 22:28:43 -07:00 committed by GitHub
parent 566e4cee4b
commit 79307b7933
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

Diff content is not available