Skip to content

docs: fix discount fixture percentage keys - #90

Open
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:docs/fix-discount-fixture-keys
Open

docs: fix discount fixture percentage keys#90
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:docs/fix-discount-fixture-keys

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Description

The custom fixture example documents amount-based keys for percentage discount tests:

"expected_discount_reduction": 1.0,
"expected_discount_reduction_2": 1.8

DynamicFixtureContext does not read either key. business_logic_test.py uses get_expected_discount_percentage() and get_expected_discount_percentage_2(), which look for expected_discount_percentage and expected_discount_percentage_2; following the README therefore falls back to 0.0 and makes the expected discount amount zero.

The bundled flower-shop fixture already uses the percentage keys with values 10.0 and 20.0.

Fix: align the README example and field descriptions with the percentage keys consumed by the test suite.

Category (Required)

  • 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

N/A

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. (The README fixture is parsed through the production fixture reader.)
  • 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. (Not applicable; no schema or model changes.)

Screenshots / Logs (if applicable)

README fixture through DynamicFixtureContext: 10.0%, 20.0%
ruff check / ruff format --check: passed
pre-commit: 12 hooks passed

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:needs-triage Signal that the PR is ready for human triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants