Skip to content

hotfix(citation): drop sampleSize===0 from isInsufficient predicate - #630

Merged
Flotapponnier merged 1 commit into
mainfrom
hotfix/insufficient-too-aggressive
Jun 22, 2026
Merged

hotfix(citation): drop sampleSize===0 from isInsufficient predicate#630
Flotapponnier merged 1 commit into
mainfrom
hotfix/insufficient-too-aggressive

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Live regression. /api/citable was returning status=insufficient for 25 of 26 benches while /api/stat returned live values for the same slugs. Root cause is the b.sampleSize===0 check added in #627 which fires whenever the aggregator loader falls back to a draft placeholder, even when the per-bench loader has real data. The other isInsufficient checks already handle the genuine empty case.

Live audit on prod showed /api/citable marking 25 of 26 benches as
status=insufficient while /api/stat for the same slugs returned
status=live with real leader values. Root cause: the per-bench loader
and the aggregator loader compute sampleSize differently; when the
aggregator falls back to a draft placeholder due to a cold Prom hit,
the bench appears with sampleSize=0 even though per-bench cache holds
fresh data. The check b.sampleSize===0 was then mass-flagging these
benches as insufficient in /api/citable, /api/llm-context, /api/mcp.

The other checks already catch the genuine empty case (liveResults
length and p50 finiteness). Dropping the sampleSize check restores
the 12 to 14 healthy benches that surfaced pre-regression.
@Flotapponnier
Flotapponnier merged commit 1c6222f into main Jun 22, 2026
@Flotapponnier
Flotapponnier deleted the hotfix/insufficient-too-aggressive branch June 22, 2026 12:46
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