fix(rest/python): update UCP version to 2026-04-08#129
Merged
Conversation
Update the UCP version to 2026-04-08 in the Python sample server's discovery profile, checkout service, MCP routes, and README documentation. TAG=agy CONV=c03c5438-5e14-414a-9404-e0f2bdbe433c
17 tasks
ptiper
approved these changes
Jul 13, 2026
nicholasjameshall
approved these changes
Jul 13, 2026
vishkaty
added a commit
to vishkaty/samples
that referenced
this pull request
Jul 16, 2026
Regenerates the discount totals[] entries in the happy-path dialog to match the corrected sign (now -650). The applied[].amount entries stay positive (the magnitude). Scoped to the discount lines only; the file is otherwise still on the 2026-01-23 profile shape (predates Universal-Commerce-Protocol#129) and is out of scope for this PR.
vishkaty
added a commit
to vishkaty/samples
that referenced
this pull request
Jul 16, 2026
Regenerates the discount totals[] entries in the happy-path dialog to match the corrected sign (now -650). The applied[].amount entries stay positive (the magnitude). Scoped to the discount lines only; the file is otherwise still on the 2026-01-23 profile shape (predates Universal-Commerce-Protocol#129) and is out of scope for this PR.
damaz91
pushed a commit
that referenced
this pull request
Jul 16, 2026
* fix(rest): emit discount totals[] entry as a negative amount The flower-shop checkout appended the discount to totals[] with a positive amount, so the receipt did not reconcile (subtotal + discount != total) and the entry violated total.json, which constrains discount/items_discount amounts with exclusiveMaximum: 0. Per discount.md the applied[].amount is the magnitude (always positive) while the totals[] entry is its signed effect on the receipt (negative for a discount). Negate only the totals[] entry; applied[].amount and the allocation stay positive. Adds a test asserting the discount total is negative, applied amounts stay positive, and subtotal + discount == total; corrects the existing case-insensitive test, which asserted the old positive value. * docs(rest): update sample output discount totals to the negative sign Regenerates the discount totals[] entries in the happy-path dialog to match the corrected sign (now -650). The applied[].amount entries stay positive (the magnitude). Scoped to the discount lines only; the file is otherwise still on the 2026-01-23 profile shape (predates #129) and is out of scope for this PR. * fix(nodejs): emit discount totals[] entry as a negative amount The Node.js server had the same sign bug as the Python server: the discount was pushed to totals[] with a positive amount, so the receipt did not reconcile and the entry violated total.json (exclusiveMaximum: 0). Negate only the totals[] entry; applied[].amount and the allocation stay positive (the magnitude, per discount.md). Adds a test driving recalculateTotals against an in-memory catalog: the discount total is negative, the receipt reconciles (subtotal + discount == total), and applied[].amount stays positive.
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
Update the UCP version to 2026-04-08 in the Python sample server's discovery profile, checkout service, MCP routes, and README documentation.
Category (Required)
Please select one or more categories that apply to this change.
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
Checklist
!for breaking changes).Screenshots / Logs (if applicable)