Repository navigation
Release app-server thread runtimes after shutdown - #57788
Merged
copyberry[bot] merged 1 commit intoOct 28, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why Waiting for the event channel to close after `ShutdownComplete` retains the thread runtime because the thread owns its event sender. Remaining subscribers still need late notifications after shutdown. ## What changed - Release runtime references after `ShutdownComplete` while keeping the listener command queue available for ordered notifications and late request resolutions. - Preserve other subscribers when a client unsubscribes or disconnects from an unloaded thread, and serialize terminal cleanup with cold resumes. - Return the thread-closing error when `thread/resume` encounters a terminated runtime or a listener that cannot complete the request. - Close the status watch when removing a thread so a later load gets a fresh watch. ## Testing Add regression coverage for listeners attached before and after shutdown, verifying runtime release, preservation of remaining subscribers, late notification delivery, and rejection of resumes against a terminated runtime. Add a test that removing and reloading a thread closes the old status watch. GitOrigin-RevId: 6dda8f83a0fbe06c9a713e9801356753a0de172e
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/6dda8f83a0fbe06c9a713e9801356753a0de172e
branch
from
October 28, 2026 16:56
0e0eb4c to
7f4d53e
Compare
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/6dda8f83a0fbe06c9a713e9801356753a0de172e
branch
October 28, 2026 16:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release app-server thread runtimes after shutdown
Why
Waiting for the event channel to close after
ShutdownCompleteretains the thread runtime because the thread owns its event sender. Remaining subscribers still need late notifications after shutdown.What changed
ShutdownCompletewhile keeping the listener command queue available for ordered notifications and late request resolutions.thread/resumeencounters a terminated runtime or a listener that cannot complete the request.Testing
Add regression coverage for listeners attached before and after shutdown, verifying runtime release, preservation of remaining subscribers, late notification delivery, and rejection of resumes against a terminated runtime. Add a test that removing and reloading a thread closes the old status watch.