Fix SSE notification routing and stale session cleanup#186
Conversation
Route operation progress to its owning session and expire inactive client sessions. Improve overflow accounting so dropped notifications remain observable without warning amplification.
Verify the process catalog owned by the control plane instead of the transient activation attempt phase, which can legitimately be cleared or replaced after catalog publication.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a03656feff
ℹ️ 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: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Purpose
Prevent SSE notification buffer overflows caused by progress notifications being fanned out to unrelated or abandoned sessions. The warning represented real notification eviction, although stale-session fan-out amplified it.
Changes
notifications/progressonly to the client session that owns the active operation.User impact
Active clients receive progress only for their own operations, abandoned sessions no longer accumulate indefinitely, and overflow warnings now contain enough information to distinguish real client backpressure from stale-session amplification.
Testing
swift test --no-parallel -Xswiftc -strict-concurrency=minimal— 981 tests in 64 suites passedenv XCODE_MCP_RUN_PROCESS_TESTS=1 swift test --no-parallel --filter XcodeMCPProcessRuntimeTests -Xswiftc -strict-concurrency=minimal— 24 tests passedenv XCODE_MCP_RUN_PROCESS_TESTS=1 swift test --no-parallel --filter ProxyStdioAdapterTests -Xswiftc -strict-concurrency=minimal— 13 tests passedgit diff --check