Skip to content

fix(docs): tolerate npm downloads rate limits - #1841

Merged
EmersonBraun merged 1 commit into
mainfrom
codex/npm-downloads-rate-limit
Oct 13, 2026
Merged

EmersonBraun merged 1 commit into
mainfrom
codex/npm-downloads-rate-limit

Conversation

@EmersonBraun

Copy link
Copy Markdown
Member

Summary

  • Keep the public npm downloads response in Cloudflare's edge cache for 24 hours.
  • Fetch the 36 scoped packages with two concurrent workers and use @agentskit/net retry/backoff for npm 429 and transient 5xx responses.
  • Document the cache freshness behavior and refresh the README source hash.

Why

The first production release in #1840 exposed intermittent npm 429 responses. Cloudflare returned 502 from /api/downloads, leaving /downloads in its retry state. Worker logs identified npm downloads API returned 429 for @agentskit/net.

Validation

  • pnpm --filter @agentskit/docs-next lint — passed.
  • pnpm --filter @agentskit/docs-next test — 58 passed.
  • pnpm check:readme-standard -- --json and pnpm test:readme-standard — passed.
  • node scripts/check-net-rules.mjs — passed.
  • pnpm --filter @agentskit/docs-next build:vinext — passed.
  • Cloudflare local preview /api/downloads — 200, 36 distinct packages.
  • Full pre-push monorepo build could not finish locally due ENOSPC while Next prerendered docs. The required GitHub CI must pass on this SHA before merge.

@github-actions

Copy link
Copy Markdown
Contributor

Lighthouse

URL Performance Accessibility Best practices SEO
http://127.0.0.1:3000/ 86 100 96 100
http://127.0.0.1:3000/docs 82 100 96 100
http://127.0.0.1:3000/docs/get-started/getting-started/quickstart 86 100 96 100
http://127.0.0.1:3000/stack 96 100 96 100
http://127.0.0.1:3000/showcase 96 100 96 100

Run by .github/workflows/lighthouse.yml.

@EmersonBraun
EmersonBraun force-pushed the codex/npm-downloads-rate-limit branch from 2898b39 to e6899c6 Compare October 13, 2026 16:10
@github-actions

Copy link
Copy Markdown
Contributor

Lighthouse

URL Performance Accessibility Best practices SEO
http://127.0.0.1:3000/ 60 100 96 100
http://127.0.0.1:3000/docs 85 100 96 100
http://127.0.0.1:3000/docs/get-started/getting-started/quickstart 85 100 96 100
http://127.0.0.1:3000/stack 91 100 96 100
http://127.0.0.1:3000/showcase 96 100 96 100

Run by .github/workflows/lighthouse.yml.

@EmersonBraun
EmersonBraun merged commit 779aa60 into main Oct 13, 2026
17 checks passed
@EmersonBraun
EmersonBraun deleted the codex/npm-downloads-rate-limit branch October 13, 2026 16:27
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