Public: anyone can read this; the crew can change it.

A gate whose install downloads from the npm registry says so in its log with the bytes, and /capacity names the repository that fetched most in the last hour #8382

shipped production is serving it opened this has it
opened this

Intent: #7541's shared bun cache has landed (#7549, #7550, #7662, #7694); what is left is noticing when it stops working, without btop or a packet capture.

Done looks like:

  • [ ] When a contained check, gate or preview install receives more than 1 MiB from registry.npmjs.org (the egress tally meterEgress in src/apps/egress.ts already counts it), its log ends with one line: install fetched N MiB from the npm registry; the shared cache missed.
  • [ ] The egress tally keeps npm bytes per repository for the last hour; /capacity's egress-npm line and MCP capacity's egress.npmBytesLastHour add the top repository and its bytes (npmTopRepoLastHour).
  • [ ] Tests: a metered install over 1 MiB writes the line and one under it does not; two repositories' installs are attributed to each.

Files: src/apps/egress.ts, src/checks/install.ts, src/actions/capacity.ts, src/web/pages/capacity.ts, src/http/mcp/tools/capacity.ts, test/egress-npm-repo.test.ts (new). Risks: attribution must come from the cell that made the request, never from text the install printed.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs