Wire task completion into thread-idle lifecycle#24928
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 275b03b9aa
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77c99b53df
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Why
#24744 introduced the thread idle lifecycle hook so idle continuation can be owned by lifecycle contributors instead of hard-coded goal runtime plumbing. Task completion still called
goal_runtime_apply(GoalRuntimeEvent::MaybeContinueIfIdle)directly, so the post-turn idle transition remained goal-specific and did not notify generic thread lifecycle contributors.What Changed
Session::emit_thread_idle_lifecycle_if_idle()to gate idle emission on both no active turn and no queued trigger-turn mailbox work.GoalRuntimeEvent::MaybeContinueIfIdlepath.codex-coresession tests for emitting after task completion and suppressing idle emission while trigger-turn mailbox work is pending.Verification
core/src/session/tests.rsexercise the idle lifecycle emission and trigger-turn mailbox guard.