Repository navigation
docs: align the published quote contract with what the code serves - #237
Open
Sebastian Hölscher (HoelShare) wants to merge 1 commit into
Open
Sebastian Hölscher (HoelShare) wants to merge 1 commit into
Sebastian Hölscher (HoelShare) wants to merge 1 commit into
Conversation
The spec and openapi described behaviour the plugin does not have: - The descriptor carries no `config.endpoint`; operation paths come from the schema's `paths`, resolved against the shop base URL. - The capability version is the contract revision, not the UCP protocol version. SDK negotiation matches capabilities by exact version, so it stays 2026-04-08. - Without SwagCommercial's quote bundle the quote routes are never imported, so every call is a 404; 501 is the installed-but-unlicensed case. Nothing answers 501 for a "disabled" capability. - `expired` is the merchant's turn (it can extend it); the openapi per-line-ask note read "where they are" for "where they are absent"; the spec now lists every idempotency 409, including in-flight keys. - Error `code` values are the SDK's (`invalid_request`, `not_found`, `capability_unsupported`, `idempotency_conflict`); insufficient_scope and the accept failure arrive as `invalid_request` with the detail in `content`; the UCP-Agent 401 message does not name the header. - The Quote Management feature gates only the four mutating operations. - `order` and `a2cn_session_id` appear only in the accept and request responses; quote responses never carry `ucp.capabilities`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The
com.shopware.quotespec and openapi had drifted from the code. Only Quote's wire shape is test-pinned, so I re-read both end to end againstsrc/Bridge,src/Ucpand the UCP SDK 0.0.6. These are the fixes, each checked against the code path. The only PHP changes are two docblocks.From the 2026-10-09 docs audit
version,specandschema. The spec no longer shows aconfigblock. Agents take the operation paths from the schema'spathsand resolve them against the shop base URL, which is howscripts/ucp-quote-agent.pyalready works. I fixed the spec rather than publishing an endpoint: nothing reads one.2026-04-08. Since 0.0.6 the SDK negotiates capabilities by exact version, and calls them "contract revisions, not release numbers" (NegotiatedCapabilityResolver). Bumping it with no contract change would silently drop the capability for agents that list the current version. The spec's Versioning section now says this, and so does a docblock onQuoteCapabilityDescriptor::VERSION.AgentFacingRoutesnever importsUcpQuoteController, so every call is a 404. 501 means installed but unlicensed, or missing a service the capability needs. The spec, openapiinfo, theUnsupported/NotFoundresponses and theQuoteCapabilitydocblock now say this.requestQuote/listQuotesalso list the 404. Nothing returns 501 for a "disabled" capability, so that claim is gone.expiredis now the merchant's turn, matchingx-state-machine. The openapi now reads "Where they are absent". The spec lists the 409 for a stored response too large to replay.Found on the end-to-end re-read
codeexamples now match what the SDK emits:invalid_request,not_found,idempotency_conflict,capability_unsupported.invalid_request. The detail is incontent(prefixinsufficient_scope:, or the quote-to-order reason).CHECKOUT__QUOTE_CANNOT_PLACE_ORDERnever reaches the body.UCP-Agent, because the SDK error response dropsWWW-Authenticate. The errors table now quotes what the message says.orderappears only in the accept response and its replay.a2cn_session_idappears only in the request response.ucp.capabilitiesnever appears on quote responses: the SDK maps noquote.*operation.limit/pageis a 400.Idempotency-Keyis "required by shops configured to demand it", no longer tied to the signature policy.Test plan
composer run test: 1923 tests pass.QuoteSnapshotTestandQuoteContractControllerTestread the openapi.composer run quality: exit 0🤖 Generated with Claude Code