polo: switch to /api/public-stats + drop growth-% + lifetime requests#19
Merged
Conversation
Companion to pilot-protocol/rendezvous#50. /api/stats is now admin- gated on polo.pilotprotocol.network; this page consumes the new /api/public-stats endpoint instead. The new payload is intentionally minimal — server_time, uptime_seconds, active_nodes, total_nodes, components{}. No daily/hourly history, no total_requests lifetime counter, no per-IP breakdown, no badge values, no trust links, no networks count. Consequence on the live page: - Hero stats: 'agents' figure stays (driven by total_nodes/active_nodes). - 'requests' figure: was driven by stats.total_requests. Lifetime count is no longer published. The static fallback ('5B+') stays in the markup; the JS no longer overwrites it because the data is gone. Acceptable until we ship a curated rate metric. - 'Growth +X% in the past 7 days' tile: removed. Was computed client-side from stats.daily[] which is no longer published. - 'Growth, past 7 days' big-number tile: removed. - growth7d() helper + fmtRequests() helper: removed (now unused). Both pages tested with 'npm install && npx astro build' — 297 pages generated in 17.4s, no errors.
|
🚀 Preview deployed to Cloudflare Pages
|
TeoSlayer
added a commit
that referenced
this pull request
Jun 7, 2026
#19 migrated this page to /api/public-stats which doesn't expose the lifetime total_requests counter; the static fallback ('5B+') was rendered at build time and never updated, leaving a fixed string that didn't match anything live. Two removals: - hero meta strip: 'X agents · 5B+ requests' → 'X agents' - stats block: '5B+ Requests routed' tile removed No other call sites — fmtRequests + the JS .requests assignment were already removed in #19. Co-authored-by: Teodor Calin <teodor@vulturelabs.io>
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.
Companion to pilot-protocol/rendezvous#50. `/api/stats` is now admin-gated on polo.pilotprotocol.network; this PR migrates the polo public website to the new curated `/api/public-stats` endpoint.
Changes
Knobs intact
Coordination
This PR must merge after rendezvous#50 ships to prod, OR Cloudflare-Pages can deploy this revision first (graceful: the migrated fetch hits `/api/public-stats` which doesn't exist yet → 404 → quiet `.catch` → fallback markup renders). Either order is safe.
Test plan