feat(integrity): per-bench expected_n + sample-health badge - #629
Closed
Flotapponnier wants to merge 1 commit into
Closed
feat(integrity): per-bench expected_n + sample-health badge#629Flotapponnier wants to merge 1 commit into
Flotapponnier wants to merge 1 commit into
Conversation
Flotapponnier
commented
Jun 22, 2026
CollaboratorAuthor
Conflicts with #627 (insufficient propagate, already merged to main). Main already serves the integrity story via isInsufficient on /api/stat /api/citable /api/llm-context /api/mcp + bench card pill + home table pill. The low-sample BADGE UI added by this PR is a refinement on top, not critical. Will rebase and ship in a follow-up if needed, or via a future wholesale dev to main merge. Dev has the badge live via #628. |
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 freeto 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.
Companion to #628 (same change, applied directly against main's
pre-refactor structure because main and dev have diverged in the
materialize layer).
Bench pages currently rank providers based on sample counts that
vary from 3 to 1500+ per provider depending on the bench cadence,
without surfacing the confidence level. The methodology page
advertises n >= 1000 which is misleading on low-cadence benches
like oracle-deviation (3 to 4 samples per provider) and perp-funding
(3 samples per venue by design).
This change introduces a per-bench expected_n declared in the YAML
spec. The page computes health = actual / expected_n per provider
and badges rows below 50 percent of expected as "low sample" or
hides rankings below 10 percent as "insufficient". The bench-wide
aggregate also propagates to /api/citable, /api/stat and the
headline sentence so an "insufficient" field stops asserting a
winner in machine-readable feeds.
YAML field is optional. Benches without expected_n behave as before
(no badge, no hide).
YAMLs touched: oracle-deviation (4), perp-funding (3),
aggregator-head-lag (50000), bridge-quote-latency (3000),
bridge-fee (1000).
Test plan: