Repository navigation
Align website package stats with authoritative providers and clarify metric semantics - #31
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: sahiljagtap08 <95201277+sahiljagtap08@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix website's install/download statistics for accuracy
Align website package stats with authoritative providers and clarify metric semantics
Sep 22, 2026
sahiljagtap08
marked this pull request as ready for review
September 22, 2026 18:17
This branch was successfully deployed
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 free
to 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.
Website hero stats were drifting from registry totals due to provider mismatch (PyPI) and expensive/risky aggregation logic (npm). This updates stat sourcing, caching, and UI wording so displayed values stay current and accurately represent what is being measured.
PyPI: source of truth aligned to Pepy
GET /api/pypi-statsnow readsapi.pepy.techtotal downloads (the same provider linked from the UI), with validated fallback topypistatsif Pepy is unavailable.s-maxage+stale-while-revalidate) to avoid per-request provider fan-out.npm: true all-time downloads without range paging
GET /api/npm-statsreplaced sequential range summing with a single all-timedownloads/point/{start}:{today}request.time.created) with safe fallback.@agentbudget/agentbudget(unscopedagentbudgetdoes not match published package metadata).Go: preserve honesty of proxy metric
GET /api/go-statsremains GitHub traffic-based and explicitly returns proxy metadata (is_proxy,window_days).GITHUB_TOKENgracefully returns null metric (no misleading install count), with non-sensitive server logging and cache policy.Hero badges: clearer semantics + resilient client fetch
downloads14d clone proxytotal downloads(PyPI + npm), avoiding mixing all-time downloads with 14-day proxy traffic.