docs(loyalty): fix dangling reference, minor-unit amount, breakdown invariant, and code registries - #662
Open
vishkaty wants to merge 1 commit into
Open
Conversation
…akdown invariant, and code registries Four small loyalty corrections: - The main example says it builds on a "store loyalty card example" from the checkout Eligibility Verification at Completion section, which contains only a student-verification example. Reword to build on the eligibility-verification pattern and introduce the store-card scenario inline. - The store-card discount example applied `amount: 10` ($0.10 in minor units) while the surrounding text describes a $10 benefit; sibling examples use minor units (1000). Correct the four discount and allocation amounts to 1000. - earning_forecast.breakdown had no invariant tying it to the headline amount. State that the breakdown amounts MUST sum to `earning_forecast.amount`, matching the discount-allocation and totals conventions. - The standard codes membership_benefit_eligible and membership_benefit_ineligible were defined in a normative table but absent from the info_code and warning_code examples registries. Append them.
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.
Problem
Four small loyalty corrections:
amount: 10($0.10 in minor units) while the surrounding text describes a $10 benefit; sibling examples use minor units (1000).earning_forecast.breakdownamounts have no statement tying them toearning_forecast.amount, unlike discount allocations and totals.membership_benefit_eligibleandmembership_benefit_ineligibleare defined in a normative table but not in theinfo_code/warning_codeexamples arrays that tooling treats as the standard-code registry.Fix
loyalty.md: reword to build on the eligibility-verification pattern and introduce the store-card scenario inline; correct the four discount/allocation amounts to1000.loyalty.json: state that the breakdown amounts MUST sum toearning_forecast.amount.info_code.json/warning_code.json: append the two codes.Verification
The four amount changes sit inside an
extract=$.loyaltyexample, so no totals are affected; the points-earning breakdown (10 + 20 = 30) is untouched.ucp-schema lint source/andvalidate_examples.pypass (282, unchanged).