Skip to content

Expose seller response and purchase evidence - #760

Open
epistemedeus wants to merge 2 commits into
MikeyPetrillo:mainfrom
epistemedeus:epistemedeus/response-contract-evidence
Open

Expose seller response and purchase evidence#760
epistemedeus wants to merge 2 commits into
MikeyPetrillo:mainfrom
epistemedeus:epistemedeus/response-contract-evidence

Conversation

@epistemedeus

@epistemedeus epistemedeus commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What

Expose compact seller-declared response-contract evidence on crawled OpenAPI
operations and propagate it through seller detail, /api/route, and
/api/index/tools.

Each row can now report:

  • state: absent, partial, or declared
  • the bounded count of explicit 2xx variants and JSON schemas
  • dotted paths guaranteed across every explicit success variant
  • source: seller_openapi
  • runtimeVerified: false

Why

An x402 route can be discoverable and payable while its OpenAPI contract does
not guarantee the output a buyer needs. A concrete example is Zerion's paid
transaction-simulation POST: the success schema requires data, but only
describes nested data.attributes.

This change gives routing clients the evidence needed to filter or perform
their own authorization. It deliberately does not change Agent402's ranking,
payability, or execution behavior.

Safety boundaries

  • reporting only, with no ranking change
  • no target request or payment
  • at most sixteen explicit success variants and sixty-four guaranteed paths
  • paths are intersected across all explicit 2xx variants
  • malformed seller schemas report partial instead of failing the seller crawl
  • seller-declared evidence remains explicitly runtime-unverified
  • cached tool rows store a compact tuple and expand it only on public surfaces
  • uses the zero-dependency MIT package agent-payment-policy@0.11.1

Verification

  • node scripts/test-openapi-fallback.js
  • TARGET_URL=http://127.0.0.1:3210 node scripts/test-projection-parity.js
  • npm test
  • npm audit --omit=dev

The focused suite covers multi-variant intersection, described-but-optional
nested fields, unresolved schemas, malformed schemas, Bazaar merge retention,
and three-surface projection parity. The normal unit suite and dependency audit
pass under the repository's required Node 22.22.2 runtime.

On Agent402's current 533-operation, 1.15-MB OpenAPI, normalization measured
about 7 ms median and 10.9 ms p90 locally. Compact internal storage reduced the
projected 77,689-tool cache overhead from about 12.5 MB to 3.1 MB while every
buyer-facing surface keeps the readable object.

Related seller finding: zeriontech/zerion-ai#111

Purchase-evidence follow-up

The same reporting-only path now recognizes the neutral pre-purchase evidence profile from agent-payment-policy@0.12.0. The crawler reads the bounded Link header from seller discovery responses, requires registered describedby plus the exact absolute extension relation, fetches at most one same-origin manifest per seller with redirects disabled, and cross-checks exact GET/POST operations against the current OpenAPI schema digest and complete guaranteed-path set.

The seller-level projection retains the public manifest identity once. Compatible route projections carry only a compact seller_manifest marker. Missing or invalid evidence does not affect ranking, health, routing, authorization, or payment. No per-route probe was added.

This follows a deterministic external screen where twelve live-valid Agent402 and MPP routes exposed zero compatible manifests. That is bounded recurrence evidence, not a prevalence claim. SameDayDesk is currently the owner-dogfood seller; merge would create a marketplace ingestion path, not independent buyer demand or certification.

Local acceptance: focused OpenAPI fallback and ingestion suite, 59/59 core checks, security regressions, package-integrity 27/27, live projection parity 21/21, and zero production dependency findings.

@socket-security

socket-security Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​agent-payment-policy@​0.12.07710010095100

View full report

Signed-off-by: Lucian Constantinescu <epistemedeus@gmail.com>
@epistemedeus
epistemedeus force-pushed the epistemedeus/response-contract-evidence branch from 0de506d to 9362ff4 Compare August 12, 2026 13:19
@epistemedeus
epistemedeus marked this pull request as ready for review August 12, 2026 13:37
Signed-off-by: Lucian Constantinescu <epistemedeus@gmail.com>
@epistemedeus epistemedeus changed the title Expose seller response contract evidence Expose seller response and purchase evidence Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant