Fix verifier sample and add Docs links for Playground/Webhook Demo#353
Merged
GsCommand merged 1 commit intoMay 26, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Motivation
hasLegacyTopLevelProof), so loading the sample producedINVALIDeven when not tampered.PlaygroundandWebhook Demoin the Docs dropdown without adding top-level nav clutter.Description
public/receipts/demo-valid-receipt.jsonandpublic/receipts/demo-tampered-receipt.jsonwith canonicalmetadata.prooffields (hash.alg/value,signature.alg/kid/value,signer_id) so the real verifier can returnVERIFIEDfor the valid fixture andINVALIDfor the tampered fixture.public/verify.htmlto emphasizeLoad Sampleas primary andLoad Tamperedas danger, update explanatory copy to clarify thatVERIFIED= hash and signature passed andINVALID= tampered/stale/malformed/metadata mismatch, and leave the real/api/verifyflow intact (no hardcoded verdicts).Playground(/playground.html) andWebhook Demo(/webhook-auto-verify.html) links into the Docs dropdown across public pages and add reciprocal small cross-link cards between/playground.html,/webhook-auto-verify.html, and/proof.htmlfor discovery.tests/public-pages.test.jsto assert that the valid sample verifies asVERIFIED, the tampered sample verifies asINVALID,public/js/verify.jsreferences the sample fixture path, and pages include the new demo links while avoiding raw-markdown nav links.Testing
npm testand all test suites passed (69 tests, 0 failures), including the newtests/public-pages.test.jswhich asserts the valid sample isVERIFIEDand the tampered one isINVALID.npm run check:linksandnode scripts/check-local-links.mjs, which reported all local links/assets resolved across HTML files.examples/webhook-auto-verifywithnpm run check, which succeeded.VERIFIEDwithhash_matches: trueandsignature_valid: true, and the tampered fixture yieldsINVALIDwith hash/signature mismatch; the UI still calls/api/verify(no frontend hardcoding); Docs dropdown now includes/playground.htmland/webhook-auto-verify.htmlconsistently.Codex Task