Repository navigation
[Server] Announce listChanged only where list changes are delivered - #593
Merged
chr-hertel merged 2 commits intoOct 14, 2026
Merged
chr-hertel merged 2 commits into
chr-hertel merged 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The key listChanged-only edge case lacks direct coverage, and the builder documentation ambiguously reverses the registry condition.
2 open findings
What changed in this PR
Corrects listChanged capability advertisement to match actual notification delivery paths.
Changes:
- Removes
listChangedfrom handshake initialization. - Limits automatic advertisement to notification buses using the built-in registry.
- Adds regression tests and changelog documentation.
| File | Description |
|---|---|
src/Schema/ServerCapabilities.php |
Adds capability transformation for handshake responses. |
src/Server/Handler/Request/InitializeHandler.php |
Strips list-change flags during initialization. |
src/Server/Builder.php |
Refines automatic capability detection. |
tests/Unit/Server/BuilderTest.php |
Tests builder detection conditions. |
tests/Unit/Server/Handler/Request/InitializeHandlerTest.php |
Tests handshake capability filtering. |
tests/Unit/Server/Stateless/StatelessProtocolTest.php |
Tests modern discovery advertisement. |
CHANGELOG.md |
Records the corrected behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
chr-hertel
force-pushed
the
fix-list-changed-capability
branch
2 times, most recently
from
October 14, 2026 22:56
d63ac96 to
39564a7
Compare
chr-hertel
force-pushed
the
fix-list-changed-capability
branch
from
October 14, 2026 23:06
39564a7 to
14a10e5
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

The server announced
listChangedwhenever an event dispatcher was set, but list changes only reach clients throughsubscriptions/listen. Handshake-era clients never got them, and neither did anyone without a notification bus.initializeno longer carrieslistChanged(newServerCapabilities::withoutListChanged())listChangedonly with a notification bus and the built-in registrysetCapabilities()still keep it onserver/discoverFixes chr-hertel#76
🤖 Generated with Claude Code