This repository was archived by the owner on May 24, 2026. It is now read-only.
Fix v1.1.0 schema release blockers: verify ref, purchase duplicate-keys, authorize conditionality, requester clarification, duplicate-key guard#17
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation
verify.receiptschema compiles under strict AJV and remove duplicate-key JSON artifacts that could mask intended stricter shapes.authorize.receiptand clarifyverify.requestactor semantics so the contract is unambiguous.Description
schemas/v1.1.0/commercial/verify/verify.receipt.schema.jsonby pointingverifierto the existing#/$defs/verifier_actorso the verifier role remains typed and no broken internal$refremains.schemas/v1.1.0/commercial/purchase/purchase.receipt.schema.jsonby removing duplicatesettlementand duplicatepayment_proofdefinitions and leaving the stricter purchase-specificx402_proofshape as the activepayment_proofcontract.payment_refadded) soexamples/v1.1.0/commercial/purchase/valid/900-purchase.receipt.valid.jsonvalidates against the corrected schema.authorization_idconditional inschemas/v1.1.0/commercial/authorize/authorize.receipt.schema.jsonso it is required forapprovedstates and explicitly forbidden (along with other approval-only fields) indeniedandpendingstates, preserving approved-state rigor.requestersemantics inschemas/v1.1.0/commercial/verify/verify.request.schema.jsonand updatedREADME.mdandSPEC.mdto staterequesteris an initiator slot (not a new governed actor role).scripts/load-json-strict.mjsand wired it intoscripts/validate-all.mjsandscripts/validate-examples.mjsso JSON files are scanned for duplicate keys beforeJSON.parse.checksums.txtto reflect the changes to schemas and validation scripts.Testing
npm run validate(which runs schema, example, and integrity checks) and it completed successfully.npm run validate:examplesand all example groups validated successfully.schemas/v1.1.0/commercial/verify/verify.receipt.schema.jsonwith AJV under strict mode and compilation succeeded.schemas/v1.1.0/commercial/purchase/purchase.receipt.schema.jsonandexamples/v1.1.0/commercial/purchase/valid/900-purchase.receipt.valid.json, both parsed/validated with no duplicate-key errors.Codex Task