Skip to content

Repair purchase.receipt schema, normalize payment_proof, add validator guardrails, remove unvalidated TS examples, regenerate checksums#21

Merged
GsCommand merged 1 commit intomainfrom
codex/fix-integrity-and-canonicality-in-protocol-commercial
Mar 20, 2026
Merged

Repair purchase.receipt schema, normalize payment_proof, add validator guardrails, remove unvalidated TS examples, regenerate checksums#21
GsCommand merged 1 commit intomainfrom
codex/fix-integrity-and-canonicality-in-protocol-commercial

Conversation

@GsCommand
Copy link
Contributor

Motivation

  • Restore integrity of the v1.1.0 current-line surface by fixing a broken purchase.receipt schema that referenced a missing $defs entry.
  • Eliminate naming drift in payment proof vocabulary so the current-line canonical payment-layer reads consistently as payment_requirement, payment_session, and payment_proof.
  • Add guardrails to detect and fail on duplicated or drifting canonical $defs to prevent future copy/paste errors.
  • Resolve TypeScript example drift by demoting/unlinking unvalidated TS example directories from the authoritative current-line example surface.

Description

  • Fixed schemas/v1.1.0/commercial/purchase/purchase.receipt.schema.json by restoring the missing settlement $defs (copied from the canonical checkout receipt shape) and replacing the one-off x402_proof name with a canonical payment_proof definition wired to the existing current-line shape, preserving required payment_proof semantics for status: captured receipts.
  • Hardened scripts/validate-all.mjs to: enforce exact equality for duplicated canonical $defs listed in CANONICAL_DEF_NAMES; add PAYMENT_ALIAS_GROUPS checks that compare payment-layer alias defs (e.g. payment_proof vs x402_proof); and assert that legacy TypeScript example directories do not appear under the current-line examples/v1.1.0/**/ts tree.
  • Removed unvalidated TypeScript example directories under examples/v1.1.0/commercial/*/ts/ to avoid an unvalidated parallel example surface and updated docs to state that current-line TS examples are excluded unless explicitly validated and governed.
  • Regenerated checksums.txt so the checksum ledger matches the repaired shipped bytes; the only checksum-covered artifact that changed was schemas/v1.1.0/commercial/purchase/purchase.receipt.schema.json (new SHA-256: e4613661a5764379d0512d5b6ee05c8862089d30fc1e134694df045172019e45).
  • Small documentation edits to README.md and ONBOARDING.md clarifying that validate:examples checks JSON examples and that TypeScript example directories are excluded from the authoritative current-line surface.

Testing

  • Ran npm run validate:schemas and it succeeded (schema tree, ids, and canonical $defs checks passed). ✅
  • Ran npm run validate:examples and all current-line JSON examples validated (authorize/checkout/purchase/ship/verify). ✅
  • Ran npm run generate:checksums which wrote 37 checksum rows and updated checksums.txt. ✅
  • Ran sha256sum -c checksums.txt and all checksum targets verified ok. ✅
  • Ran the full validation npm run validate (which composes the above) and it completed successfully. ✅

Codex Task

@GsCommand GsCommand merged commit fed4bf1 into main Mar 20, 2026
1 check passed
@GsCommand GsCommand deleted the codex/fix-integrity-and-canonicality-in-protocol-commercial branch March 20, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant