Skip to content
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
GsCommand merged 2 commits into
mainfrom
codex/fix-release-blockers-for-v1.1.0-rifask
Mar 20, 2026
Merged

Fix v1.1.0 schema release blockers: verify ref, purchase duplicate-keys, authorize conditionality, requester clarification, duplicate-key guard#17
GsCommand merged 2 commits into
mainfrom
codex/fix-release-blockers-for-v1.1.0-rifask

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Resolve the known v1.1.0 release blockers and close the most visible schema-semantic drift without a broad refactor.
  • Ensure the verify.receipt schema compiles under strict AJV and remove duplicate-key JSON artifacts that could mask intended stricter shapes.
  • Tighten approval/denial semantics in authorize.receipt and clarify verify.request actor semantics so the contract is unambiguous.
  • Add a lightweight guard to make duplicate-key regressions harder to reintroduce during validation.

Description

  • Fixed schemas/v1.1.0/commercial/verify/verify.receipt.schema.json by pointing verifier to the existing #/$defs/verifier_actor so the verifier role remains typed and no broken internal $ref remains.
  • Cleaned schemas/v1.1.0/commercial/purchase/purchase.receipt.schema.json by removing duplicate settlement and duplicate payment_proof definitions and leaving the stricter purchase-specific x402_proof shape as the active payment_proof contract.
  • Resolved the example/schema mismatch by keeping the schema tight (no payment_ref added) so examples/v1.1.0/commercial/purchase/valid/900-purchase.receipt.valid.json validates against the corrected schema.
  • Made authorization_id conditional in schemas/v1.1.0/commercial/authorize/authorize.receipt.schema.json so it is required for approved states and explicitly forbidden (along with other approval-only fields) in denied and pending states, preserving approved-state rigor.
  • Clarified requester semantics in schemas/v1.1.0/commercial/verify/verify.request.schema.json and updated README.md and SPEC.md to state requester is an initiator slot (not a new governed actor role).
  • Added a focused duplicate-key guard scripts/load-json-strict.mjs and wired it into scripts/validate-all.mjs and scripts/validate-examples.mjs so JSON files are scanned for duplicate keys before JSON.parse.
  • Regenerated checksums.txt to reflect the changes to schemas and validation scripts.

Testing

  • Ran npm run validate (which runs schema, example, and integrity checks) and it completed successfully.
  • Ran npm run validate:examples and all example groups validated successfully.
  • Compiled schemas/v1.1.0/commercial/verify/verify.receipt.schema.json with AJV under strict mode and compilation succeeded.
  • Used the new strict JSON loader to parse schemas/v1.1.0/commercial/purchase/purchase.receipt.schema.json and examples/v1.1.0/commercial/purchase/valid/900-purchase.receipt.valid.json, both parsed/validated with no duplicate-key errors.

Codex Task

@GsCommand GsCommand merged commit 6a23f7e into main Mar 20, 2026
1 check failed
@GsCommand GsCommand deleted the codex/fix-release-blockers-for-v1.1.0-rifask branch March 20, 2026 01:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant