fix(ucp): constrain resource responses to success status - #747
Open
pranshu-10 wants to merge 2 commits into
Open
fix(ucp): constrain resource responses to success status#747pranshu-10 wants to merge 2 commits into
pranshu-10 wants to merge 2 commits into
Conversation
pranshu-10
marked this pull request as ready for review
August 18, 2026 18:29
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.
Description
Normal Checkout, Cart, Order, and Catalog response schemas inherit the base
ucp.statusdefinition, which permits bothsuccessanderror.As a result, a resource-shaped response can incorrectly validate with
ucp.status: "error", even though the specification defines:successas carrying the expected resource payload.erroras carrying error information instead of a resource.This change constrains
statustosuccessin the four normal resourceresponse schemas:
response_checkout_schemaresponse_order_schemaresponse_cart_schemaresponse_catalog_schemaThe field remains optional, so responses that omit
statuscontinue to validate. The existingdefault: "success"documents the default semantics but does not insert the field during JSON Schema validation.The separate error-response schema continues to require
ucp.status: "error".This is a breaking schema tightening because resource-shaped responses that explicitly use
ucp.status: "error"were previously accepted and will now be rejected.Category (Required)
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
No related issue.
Checklist
!for breaking changes).Screenshots / Logs (if applicable)
The following validations were run locally on this branch:
Schema lint
ucp-schema lint source/Example validation
uv run --frozen python scripts/validate_examples.py --schema-base source/schemas/Validator unit tests
uv run --frozen python scripts/test_validate_examples.pyTargeted schema behavior
A temporary local validation script checked all four affected response schemas: