Distinguish discovery probes from payable search requests - #205
Merged
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 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.
Bare
/searchdiscovery advertised a fabricateddiscovery-onlycapability in its payment resource and Bazaar query example. Its non-executable warning appeared only in the JSON body, so clients reading the canonicalPAYMENT-REQUIREDheader could mistake it for a purchase request.The discovery resource now omits the missing capability. The query schema requires a capability for the caller's task and labels
fact-checkas an example. All explicitly non-executable discovery challenges carry the warning and machine-readable flags in both header and body. A caller materializes its real input and obtains a fresh request-bound quote; incomplete payment-bearing retries still fail before settlement. Empty search results remain free.Validation: 138 focused tests passed, covering header/body parity, x402 schema validation, a different caller-selected capability, distinct quote binding, incomplete-request rejection, empty results, payment identifiers and MPP compatibility. Full local suites passed 2,211 JSON and 2,212 SQLite cases; their sole loopback-permission failure passed separately with that permission. The protected workflow runs all required remote checks before merge and verifies deployment. The discovery catalog test now supplies an isolated real match instead of depending on test ordering for a paid search.