core: serialize thread turn transitions#31349
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13385391c1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| }; | ||
| drop(turn_start); | ||
| if cleared_active_turn { | ||
| self.maybe_start_turn_for_pending_work().await; |
There was a problem hiding this comment.
Add integration coverage for turn-transition scheduling
This changes core agent scheduling by automatically starting queued trigger-turn mailbox work as a turn finishes, but the commit only adds unit coverage under session/tests.rs; there is no core/suite integration test exercising the full test_codex loop and emitted events for this behavior. Please add integration coverage for the queued-trigger/serialized-transition path so regressions in real agent turn sequencing are caught.
AGENTS.md reference: AGENTS.md:L114-L118
Useful? React with 👍 / 👎.
Summary
This is the fourth layer of the thread-bound idle shutdown stack and depends on #31338.
Test plan
CARGO_INCREMENTAL=0 just test -p codex-core 'interrupt_waits_for_idle_turn_start_to_install_task' 'task_finish_retries_trigger_mail_that_arrives_before_active_turn_clears' 'task_finish_emits_thread_idle_lifecycle_after_active_turn_clears' 'try_start_turn_if_idle_rejects_active_turn_without_injecting' 'idle_shutdown_claim_waits_for_submissions_and_blocks_automatic_turns' 'interrupting_regular_turn_waiting_on_startup_prewarm_emits_turn_aborted'CARGO_INCREMENTAL=0 just fix -p codex-corejust fmtStack