Repository navigation
Validate buyer-required JSON output paths - #2
Open
epistemedeus wants to merge 2 commits into
Open
epistemedeus wants to merge 2 commits into
epistemedeus wants to merge 2 commits into
Conversation
Author
|
Controller replay on the current head |
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.
Summary
Add an optional buyer-owned output contract to
paid_fetch:OUTPUT_INVALIDwith bounded payment and contract evidenceCalls without
requiredJsonPathspreserve the existing request hash and behavior. This adds no dependency or database migration.Why
SpendTree already proves authorization, settlement, response persistence, and replay. The remaining buyer-side gap is deciding whether the purchased response contains the fields that make it usable. This change provides a narrow presence contract without claiming that the seller attested to it or introducing general JSON Schema machinery.
It also makes the planned maintained canary in #1 able to distinguish "paid" from "paid and delivered the fields the buyer required."
Safety properties
nullvalue still counts as presentVerification
Run on Node.js 24.20.0:
npm cinpm run check(17/17 tests)npm run build--require-pathpaid_fetchschema exposes optionalrequiredJsonPathswithmaxItems: 16The hostile regression proves that a settled HTTP 200 missing a required nested path is recorded, rejected, and rejected again on replay with zero additional network calls or payment signatures.