Skip to content

fix(rest/python): update UCP version to 2026-04-08#129

Merged
damaz91 merged 1 commit into
mainfrom
update-version-2026-04-08
Jul 13, 2026
Merged

fix(rest/python): update UCP version to 2026-04-08#129
damaz91 merged 1 commit into
mainfrom
update-version-2026-04-08

Conversation

@damaz91

@damaz91 damaz91 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

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.

  • Core Protocol: Changes to the base communication layer, global context, or breaking refactors. (Requires Technical Council approval)
  • Governance/Contributing: Updates to GOVERNANCE.md, CONTRIBUTING.md, or CODEOWNERS. (Requires Governance Council approval)
  • Capability: New schemas (Discovery, Cart, etc.) or extensions. (Requires Maintainer approval)
  • Documentation: Updates to README, or documentations regarding schema or capabilities. (Requires Maintainer approval)
  • Infrastructure: CI/CD, Linters, or build scripts. (Requires DevOps Maintainer approval)
  • Maintenance: Version bumps, lockfile updates, or minor bug fixes. (Requires DevOps Maintainer approval)
  • SDK: Language-specific SDK updates and releases. (Requires DevOps Maintainer approval)
  • Samples / Conformance: Maintaining samples and the conformance suite. (Requires Maintainer approval)
  • UCP Schema: Changes to the ucp-schema tool (resolver, linter, validator). (Requires Maintainer approval)
  • Community Health (.github): Updates to templates, workflows, or org-level configs. (Requires DevOps Maintainer approval)

Related Issues

Checklist

  • I have followed the Contributing Guide (including Conventional Commits title requirements and ! for breaking changes).
  • I have updated the documentation (if applicable).
  • My changes pass all local linting and formatting checks.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk.

Screenshots / Logs (if applicable)

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
@damaz91
damaz91 merged commit 1012d85 into main Jul 13, 2026
14 checks passed
@damaz91
damaz91 deleted the update-version-2026-04-08 branch July 13, 2026 12:02
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants