Skip to content

Delay pending cleanup until task aborts#14000

Merged
aibrahim-oai merged 1 commit intomainfrom
codex/flaky-test-stabilization-missing-tasks
Mar 10, 2026
Merged

Delay pending cleanup until task aborts#14000
aibrahim-oai merged 1 commit intomainfrom
codex/flaky-test-stabilization-missing-tasks

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

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.

@aibrahim-oai aibrahim-oai requested a review from jif-oai March 8, 2026 21:06
@aibrahim-oai aibrahim-oai merged commit 79307b7 into main Mar 10, 2026
31 checks passed
@aibrahim-oai aibrahim-oai deleted the codex/flaky-test-stabilization-missing-tasks branch March 10, 2026 05:28
@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant