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

Capacity: report mode is loud on the health line and the page; the default shown is the booted one #914

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Follow-up to #874 (pull #903), from the review of #903 and from the lead.

shipped production is serving it for issue #874 — its issue is already done deploy ad44386

opened this

Follow-up to #874 (pull #903), from the review of #903 and from the lead.

Touches the hot file src/http/server.ts, for the /healthz line only. No shared function changes what it requires. healthResponse() gains an optional notes parameter; with no notes its answer is unchanged.

What changes

  • The health line. While cells.egress is report, /healthz answers ok, or draining, as before. The status code and the first line are unchanged. It then adds a second line: egress: reported, not enforced: every new app, preview, terminal and check cell may reach any public host on ports 80 and 443. Under enforce it is ok alone.
  • The Capacity page. While egress is reported, the page leads with a warning that says exactly what is open and what stays refused: private, loopback and cluster addresses, and every other port. It also says when to set it back.
  • The default shown.

- The crew and the check service now record what they booted with (noteBooted). The page's "default", and a reset, use that value. A hosted forge's crew booted at 1 now shows and resets to 1, not to the environment's fallback of 2. - capacityCount now falls back to the booting service's value rather than the environment's. Before this, a hosted forge's crew would have run at 2 instead of 1.

Tests (test/capacity.test.ts)

  • Enforced: /healthz is exactly ok, and the page carries no warning.
  • Reported: the status is 200, the first line is ok, and the second line names "any public host on ports 80 and 443". The page shows the warning. Flipping back to enforce returns the health line to ok.
  • A crew booted at 1: the page shows default 1, a raise reads "from 1", and a reset goes back to 1.

Checks run. Main is merged in. tsc is clean. One bun test call covered capacity, checks, mcp, here-manifest, crew-sandbox and the five cross files: 338/338 pass.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs