Skip to content

fix: enforce conditional total amount bounds - #74

Closed
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/enforce-conditional-numeric-bounds
Closed

fix: enforce conditional total amount bounds#74
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/enforce-conditional-numeric-bounds

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Summary

  • Add postprocessing for simple if/then numeric bounds that datamodel-code-generator drops.
  • Regenerate Total models so discounts must be negative and subtotal/fulfillment/tax/fee amounts must be non-negative.
  • Add codegen tests covering finder behavior, injection idempotency, and generated model validation.

Test plan

  • uv run python -m unittest discover -s tests -p 'test_*.py'
  • ./generate_models.sh 2026-04-08 (idempotent for candidate files)
  • uvx pre-commit run --all-files
  • git diff --check

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Aug 13, 2026
@damaz91

damaz91 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Already addressed by #71 - thanks!

@damaz91 damaz91 closed this Aug 13, 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