Skip to content

fix(products): per-chain chips show real leadership only, with the denominator - #2279

Merged
Flotapponnier merged 1 commit into
devfrom
fix/per-chain-chips-real-ranks
Sep 8, 2026
Merged

fix(products): per-chain chips show real leadership only, with the denominator#2279
Flotapponnier merged 1 commit into
devfrom
fix/per-chain-chips-real-ranks

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Spotted on /products/serialized: the row for bench 008 reads #3 OF 8 for the aggregate and then #1 ON ETHEREUM · #1 ON SOLANA · #1 ON BNB CHAIN · #1 ON BASE · #1 ON ARBITRUM. Both halves are defensible on their own, and together they mislead in two different ways.

1. Non-leader chips were not per-chain measurements

rankPerChainForBench holds exactly one real per-chain fact: the leader, from bestPerChain (one Prom roundtrip per chain, done in spec.ts). For everyone else it reused the unfiltered aggregate order, shifted one slot when the leader sat below them:

const rankOnChain = leaderIdx !== -1 && idx < leaderIdx ? idx + 2 : idx + 1;

So a chip reading #3 on Solana was the provider's global rank with a chain label attached, identical across every chain of the bench. The function's own docstring called this "a soft signal", but nothing in the rendered chip said so, and it sits directly beside chips that are real.

Non-leader chips are removed. A chip now means "leads this chain"; its absence means "does not lead here", never "ranks lower here".

2. The denominator was hidden

Per-chain fields on bench 008, checked against the live staging API:

filter Serialized leader providers measured
aggregate 76.98% StellarExpert 8
ethereum 96.84% Serialized 4
base 76.36% Serialized 4
solana 57.79% Serialized 2

#1 ON SOLANA was #1 of 2, rendered in the same style as a win over a crowded field, next to #3 OF 8. Chips now read #1 of 4 on Ethereum. totalRanked comes from providersPerChain; when the bench has not stashed that set the denominator is omitted rather than backfilled with the global count, which would be a different number under the same label.

Not changed

Wins accounting already counted rank === 1 entries only, so wins and chainWins are untouched. The bench page chain tabs remain the authoritative per-chain view.

237 tests pass, typecheck clean, eslint clean on the three touched files (the repo's pre-existing lint errors in stacked-share-chart.tsx and time-series-chart/ are unrelated and also fail on dev).

🤖 Generated with Claude Code

…nominator

Two problems on /products/[slug], both visible on Serialized.

rankPerChainForBench only holds one real per-chain fact: the leader, from
bestPerChain. For every other provider it reused the unfiltered aggregate
order shifted by one slot, so a chip reading "#3 on Solana" was the global
rank with a chain label on it, repeated identically across every chain of
the bench. That reads as a measurement and is not one. Non-leader chips
are gone: a chip now means "leads this chain", and its absence means
"does not lead", not "ranks lower".

The chips also hid how many providers were measured on the chain. "#1 on
Solana" was #1 of 2 on bench 008 while sitting next to "#3 of 8" for the
aggregate. They now read "#1 of 4 on Ethereum", with the denominator taken
from providersPerChain and omitted when that set is unknown rather than
substituting the global count.

Wins accounting is unchanged: it already counted rank === 1 entries only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Flotapponnier
Flotapponnier merged commit a37d0db into dev Sep 8, 2026
1 check failed
@Flotapponnier
Flotapponnier deleted the fix/per-chain-chips-real-ranks branch September 8, 2026 14:28
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