Skip to content

fix(conformance): correct SEP-1330 enum schemas in test_elicitation_sep1330_enums#600

Merged
kpavlov merged 35 commits intomainfrom
kpavlov/fix-elicitation-test
Mar 12, 2026
Merged

fix(conformance): correct SEP-1330 enum schemas in test_elicitation_sep1330_enums#600
kpavlov merged 35 commits intomainfrom
kpavlov/fix-elicitation-test

Conversation

@kpavlov
Copy link
Contributor

@kpavlov kpavlov commented Mar 12, 2026

Correct SEP-1330 enum schemas in test_elicitation_sep1330_enums

NB! This PR contains changes from #599 and should be rebased and merged after #599 is merged.

Update conformance test according to test requirements.

  • Fix legacyEnum: was using oneOf with const/title pairs; now correctly uses enum + enumNames arrays per LegacyEnumSchema spec
  • Fix titledMulti: items were using oneOf with extra type:"string"; now correctly uses anyOf per TitledMultiSelectEnumSchema spec
  • Fix return text format to match expected "Elicitation completed: action=..., content=..."
  • Remove elicitation-sep1330-enums from conformance baseline (test now passes)

How Has This Been Tested?

./conformance-test/run-conformance.sh server

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

devcrocod and others added 30 commits March 6, 2026 18:32
… directory resolution and disabling redundant shellcheck warning
fixes #589 

## How Has This Been Tested?
conformance tests 

## Breaking Changes
NaN

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

## Checklist
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
fixes #588 

## How Has This Been Tested?
conformance test

## Breaking Changes
NaN

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

## Checklist
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
…rios to matrix, and update conformance test baseline
Add configurable SSE reconnection with exponential backoff and
server-driven retry delays to `StreamableHttpClientTransport`

closes #590
closes #420 

## How Has This Been Tested?
New unit tests and pass conformance test 

## Breaking Changes
old constructors are Deprecated
`close` no longer calls `terminateSession`

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

## Checklist
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [x] I have added appropriate error handling
- [x] I have added or updated documentation as needed
- Introduced `list` command in `run-conformance.sh` to display available scenarios.
- Updated README with details about the new `list` command and its purpose.
… troubleshooting documentation

- Integrate KotlinLogging for debug messages in `test_tool_with_logging`.
- Add logging configuration via `simplelogger.properties`.
- Expand README with network traffic capture tools and usage examples.
kpavlov added 3 commits March 12, 2026 09:52
- Add `awaitCancellation()` to prevent premature stream closure in SSE handler.
…selines

Following tests are now passing:
- tools-call-with-logging
- tools-call-with-progress
- tools-call-sampling
- tools-call-elicitation
- elicitation-sep1034-defaults
…ep1330_enums

- Fix legacyEnum: was using `oneOf` with const/title pairs; now correctly uses `enum` + `enumNames` arrays per LegacyEnumSchema spec
- Fix titledMulti: items were using `oneOf` with extra `type:"string"`; now correctly uses `anyOf` per TitledMultiSelectEnumSchema spec
- Fix return text format to match expected "Elicitation completed: action=..., content=..."
- Remove _elicitation-sep1330-enums_ from conformance baseline (test now passes)
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@kpavlov kpavlov requested a review from devcrocod March 12, 2026 11:29
@kpavlov kpavlov changed the base branch from main to kpavlov/fix-sse-notifications March 12, 2026 11:29
devcrocod
devcrocod previously approved these changes Mar 12, 2026
Copy link
Contributor

@devcrocod devcrocod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

kpavlov added a commit that referenced this pull request Mar 12, 2026
…th retry support (#596) (#585)

Adds a comprehensive conformance test suite for the Kotlin MCP SDK,
covering core protocol operations, tool calls, elicitation, resources,
prompts, and 20 OAuth/auth scenarios

- Conformance server and client implementations
- OAuth/auth test scenarios: JWT, authorization code flow, client
credentials, PKCE, scope handling, cross-app access, client registration
- CI workflow
- Baseline file for tracking expected failures
- Shell script

fixes:
- #592
- #593
- #596


## Remaining known failures (tracked issues, will be fixed directly in
`main`)

- [x] `tools-call-with-logging`, `tools-call-with-progress`,
`tools-call-sampling`, `tools-call-elicitation`,
`elicitation-sep1034-defaults`-  see #599,
- [x] `elicitation-sep1330-enums` - #587 #600
- [x] `initialize` - #588 
- [x] `tools_call`, `auth/scope-step-up`, `auth/scope-retry-limit` -
#589
- [ ] `elicitation-sep1034-client-defaults` - #414 
- [x] `sse-retry` - #590 
- [ ] `resources-templates-read` - #591 

## Breaking Changes
from #596 
- `StreamableHttpClientTransport` and
`mcpStreamableHttp`/`mcpStreamableHttpTransport`: old constructors
accepting `Duration` timeout are now `@Deprecated` — use the new
overloads with `ReconnectionOptions` instead
- `StreamableHttpClientTransport.close()` no longer calls
`terminateSession()` automatically

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

## Checklist
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [x] I have added appropriate error handling
- [x] I have added or updated documentation as needed

---------

Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
@kpavlov kpavlov changed the base branch from kpavlov/fix-sse-notifications to main March 12, 2026 13:45
@kpavlov kpavlov dismissed devcrocod’s stale review March 12, 2026 13:45

The base branch was changed.

kpavlov added 2 commits March 12, 2026 16:56
# Conflicts:
#	conformance-test/README.md
#	conformance-test/conformance-baseline.yml
#	conformance-test/src/main/kotlin/io/modelcontextprotocol/kotlin/sdk/conformance/ConformanceTools.kt
@kpavlov kpavlov marked this pull request as ready for review March 12, 2026 15:08
@kpavlov kpavlov added tests documentation Improvements or additions to documentation labels Mar 12, 2026
@kpavlov kpavlov requested a review from devcrocod March 12, 2026 15:09
Comment on lines -117 to -122
| Scenario | Suite | Root Cause |
|---------------------------------------|--------|----------------------------------------------------------------------------------------------------------------|
| `elicitation-sep1330-enums` | server | *(same as above)* |
| `resources-templates-read` | server | SDK does not implement `addResourceTemplate()` with URI pattern matching; resources are looked up by exact URI |
| `elicitation-sep1034-client-defaults` | client | SDK does not fill in `default` values from the elicitation request schema before sending the response |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it was worth removing this from the readme, since it’s more visible there and includes a brief description of the issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, now we have two failed scenarios, so I don't think it’s a big problem

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs a bit more care, so it might not be the most valuable thing.

@kpavlov kpavlov merged commit 4ecd952 into main Mar 12, 2026
20 checks passed
@kpavlov kpavlov deleted the kpavlov/fix-elicitation-test branch March 12, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants