Skip to content

fix(events-client): skip the listen rows when the client never listens - #24

Draft
preston-footprint wants to merge 1 commit into
panyam:feat/events-client-conformancefrom
preston-footprint:fix/events-listen-optional-skip
Draft

preston-footprint wants to merge 1 commit into
panyam:feat/events-client-conformancefrom
preston-footprint:fix/events-listen-optional-skip

Conversation

@preston-footprint

@preston-footprint preston-footprint commented Oct 20, 2026 •

Copy link
Copy Markdown

What and why

subscriptions/listen is optional in SEP-3415, but today a client on the 2026-07-28 lifecycle that never opens it gets WARNINGs on sep-3415-client-listen-opt-in and sep-3415-client-relist-on-list-changed. That marks the run failed even when every graded row passes.

This makes both rows report SKIPPED when the client never opens a listen stream. Per AGENTS.md, SKIPPED is for checks that are legitimately not applicable, like an optional capability that was never declared; a client not using the optional listen stream is the client-side analogue. Everything else is unchanged:

  • A client that opens listen without eventsListChanged still turns both rows red.
  • On the legacy lifecycle, opt-in still skips and re-list is still graded on the GET stream.
  • A client that stops before the fifth poll still gets the existing untestable WARNING on re-list, since the notification was never due.

Raised in modelcontextprotocol#521 (comment) (item 6), and invited in modelcontextprotocol#521 (comment).

Prove it passes and fails

  • neverListens moves out of the red table into its own test, which asserts both rows are SKIPPED and nothing is red. Against the current branch it fails (WARNING where SKIPPED is expected).
  • A new broken client, listensWithoutOptIn, opens subscriptions/listen with an empty filter. Its red-table row asserts that exactly the two listen rows turn red, so the skip can't swallow a client that listens but doesn't opt in.
  • The everything-client still passes every check in events-client-poll on both lifecycles.

How Has This Been Tested?

  • npm run typecheck, npm run lint and npm run build pass.
  • npm test: 55 files, 866 tests passed (the pre-push hook ran it as well).
  • npx vitest run src/scenarios/client/events: 26 passed.

Runs against a real SDK

A Rust client built on rmcp, which doesn't use subscriptions/listen:

node dist/index.js client --command "<rmcp events_client>" --scenario events-client-poll --spec-version 2026-07-28 --force

Before (this branch's base, 095a156):

[sep-3415-client-listen-opt-in          ] WARNING ...
[sep-3415-client-relist-on-list-changed ] WARNING ...
Passed: 8/8, 0 failed, 2 warnings (1 of those unverified, not violated)
❌ OVERALL: FAILED

After:

[sep-3415-client-listen-opt-in          ] SKIPPED ...
[sep-3415-client-relist-on-list-changed ] SKIPPED ...
Passed: 8/8, 0 failed, 0 warnings
✅ OVERALL: PASSED

AI disclosure

This PR and its tests were written primarily by Claude Code, under my direction and review.

🤖 Generated with Claude Code

subscriptions/listen is optional in SEP-3415, so a client that never
opens it has nothing for sep-3415-client-listen-opt-in or
sep-3415-client-relist-on-list-changed to grade. Both rows now report
SKIPPED instead of WARNING in that case, so a client that passes every
graded row gets a green run.

The neverListens client moves from the red table to a test that
asserts both rows skip. A new broken client, listensWithoutOptIn, opens
listen without eventsListChanged and still turns both rows red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@preston-footprint
preston-footprint force-pushed the fix/events-listen-optional-skip branch from f78d733 to a18944c Compare October 20, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant