Skip to content

route: report x402 payability, publish why a result ranked, and disclose where the host has an edge - #660

Merged
MikeyPetrillo merged 2 commits into
mainfrom
claude/sweet-brown-i99jl3
Aug 2, 2026
Merged

route: report x402 payability, publish why a result ranked, and disclose where the host has an edge#660
MikeyPetrillo merged 2 commits into
mainfrom
claude/sweet-brown-i99jl3

Conversation

@MikeyPetrillo

Copy link
Copy Markdown
Owner

Answers the two questions a seller asked in #645, and corrects an overclaim the previous PR shipped in a code comment.

1. Payable over x402, or merely findable

They flagged that two of their listed endpoints are real products but key-gated: a well-formed call returns 401 with a "get a free key" pointer, never a 402 with a challenge. An agent routing there to pay has nothing to pay against.

The obvious fix is to rank those rows down. Measured across all 65,462 rows, only 47.8% carry any payability evidence and 52.2% carry none — demoting on absence would bury half the ecosystem for absence of evidence rather than evidence of absence. So the field reports and the consumer decides:

  • payable: "x402" — a price above zero, or a registry accepts entry somebody settled against
  • payable: "unknown" — no evidence, which is not the same as "no"

No money was ever at risk: route-execute's external path already requires a positive quoted price and bounds spend with maxAtomic at the tier cap, so a price-less row is refused outright. The defect was routing quality on the free ranking endpoint, not settlement.

2. Why a result ranked

Every result now carries the deciding factors in the order the sort applies them: the score, where it came from (slug / name / description), health, price rank, and the tiebreak order. "Matched on description only" tells a seller to fix their slug instead of guessing.

3. The overclaim

The previous PR shipped a comment reading "no paid placement and no operator thumb". The first half is true. The second was not, written into the source of an open-source index by the people who also sell on it.

Nobody can buy rank — no paid placement, no sponsored slot, no seller-keyed term in the scoring function. But three rules favour our own catalog:

  • it is exempt from the per-seller diversity cap, so it can exceed ceil(top/3) slots
  • its health is asserted as 1, not measured (the crawler never probes itself), and health is the first tiebreak after score
  • the listing-injection filter applies to external rows only

All three are deliberate and defensible; none was discoverable without reading the source. They now ride on every /api/route response in a neutrality block, with include=external named as the switch that removes us, and each result states whether its health was measured or asserted.

Verification

  • 21 assertions added, 79 total in scripts/test-discovery-note.js, in CI
  • The disclosure guards drift in both directions: the tests read the scoring function and fail if any seller-keyed term appears, and read the source for each advertised advantage and fail if one is removed without updating the disclosure
  • Six mutations, all killed: local-seller score bonus, silently removing the cap exemption, dropping a disclosed advantage, labelling asserted health as measured, reporting unknown payability as "none", and counting an explicit $0 as payable
  • Sweeps clean: 210 strict / 296 lenient tools, 526/526 through MCP

MikeyPetrillo and others added 2 commits August 2, 2026 15:10
…why it ranked

Two things a seller asked for in #645, and the measurement changed the answer
to the first one.

PAYABLE. They flagged that two of their listed endpoints are real products but
key-gated: a well-formed call returns 401 with a "get a free key" pointer,
never a 402 with a challenge. An agent that routes there to pay has nothing to
pay against, and the shape generalises across the index.

The obvious fix is to rank those rows down. Measured across all 65,462 rows,
only 47.8% carry any payability evidence at all and 52.2% carry none, so
demoting on absence would bury half the ecosystem for absence of evidence
rather than evidence of absence - most of those are ordinary sellers whose
price simply was not in the surface we read. So the field REPORTS and the
consumer decides: "x402" when there is a price above zero or a registry
accepts entry somebody settled against, "unknown" otherwise. Unknown is not
"no", and the tests pin that it is never reported as one.

Worth recording that no money was ever at risk here: route-execute's external
path already requires a positive quoted price and bounds the spend with
maxAtomic at the tier cap, so a price-less row is refused outright rather than
paid blind. The defect was routing quality on the free ranking endpoint, not
settlement.

WHY. A seller who loses a routing decision learns nothing from silence.
Results now carry the deciding factors in the order the sort applies them:
the score, where it came from (slug / name / description), crawl health, the
price rank, and the tiebreak order. "Matched on description only" tells a
seller to fix their slug. It also makes the neutrality claim checkable by
anyone rather than merely stated: everything in there is derived from the
seller's own published metadata and our crawl health, and there is no paid
placement to hide.

9 assertions added (67 total). Two mutations, both killed: reporting unknown
as "none" collapses the distinction the field exists for, and counting an
explicit $0 as payable makes free indistinguishable from paid.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…laiming neutrality

The previous commit shipped a comment saying the ranking has "no paid placement
and no operator thumb". The first half is true. The second was not, and it was
written into the source of an open-source index by the people who also sell on
it, which is the worst place to overstate.

What is literally true and needs no qualification: nobody can buy rank. There
is no paid placement, no sponsored slot, and no seller-keyed term anywhere in
the scoring function - it is four text-match rules over the seller's own slug,
name and description.

What is also true is that three rules favour our own catalog:

  * it is exempt from the per-seller diversity cap, so it can take more than
    ceil(top/3) slots while every external seller cannot
  * its health is asserted as 1 rather than measured, because the crawler never
    probes itself, and health is the FIRST tiebreak after score
  * the listing-injection filter is applied to external rows only

All three are deliberate and defensible. None of them was discoverable without
reading the source. They now ride on every /api/route response in a
`neutrality` block, alongside the switch that removes us from the ranking
entirely, and each result says whether its health was measured or asserted.

A smaller claim anyone can check is worth more than a larger one nobody can,
and a seller finding the cap exemption themselves would have cost more than
the exemption is worth.

12 assertions added (79 total). They guard DRIFT in both directions, which is
the real risk once a disclosure exists: the tests read the scoring function and
fail if any seller-keyed term appears, and they read the source for each
advertised advantage and fail if one is removed without updating the
disclosure. Four mutations, all killed: adding a local-seller score bonus,
silently removing the cap exemption so the disclosure overstates, dropping an
entry from the list, and labelling asserted health as measured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MikeyPetrillo
MikeyPetrillo merged commit 220c0a2 into main Aug 2, 2026
19 checks passed
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