[Client] Fill elicitation defaults when accepting - #462
Open
wWzZb wants to merge 1 commit into
Open
Conversation
wWzZb
requested review from
CodeWithKyrian,
Nyholm,
chr-hertel and
soyuka
as code owners
August 19, 2026 10:51
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.
A client accepting
elicitation/createwithout explicit field values currently has to rebuild the request schema's defaults itself. The conformance client instead returned empty content, even though each supported definition already exposesdefault.ElicitationSchema::extractDefaults()now provides the canonicalfield => defaultmap, preserves falsey values such as0andfalse, and skips fields with no default. The conformance client uses that map when accepting. Coverage includes string, integer/number, enum, titled enum, and boolean definitions.I left out the optional
ElicitResult::accepted()factory because the helper and existing constructor cover the path without adding another public entry point.The
elicitation-sep1034-client-defaultsrunner still times out on currentmainbefore the handler runs: the server sendselicitation/createon the standalone SSE stream, whileHttpTransportdoes not yet open the GET stream tracked by #327. Its expected-failure entry therefore stays in place. The 2026-07-28sep-2322-client-request-statescenario, which exercises the same handler path, passes 5/5.Checks:
vendor/bin/phpunit— 1686 tests, 4377 assertions, 7 existing skipsvendor/bin/phpstan analyse --memory-limit=-1vendor/bin/php-cs-fixer fix --dry-run --diff --verbosemake docscomposer validate --strictsep-2322-client-request-stateconformance — 5/5Fixes #328