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

A deployed forge answers in about a minute, not twelve: a prepared machine im… #16362

shipped production is serving it opened this has it

Landed in pull #16363 · 2 runs · run

opened this

A deployed forge answers in about a minute, not twelve: a prepared machine image, a one-commit fetch, and an optional warm machine

Owner, 2026-11-24: "it is also worth spending time on efficiency. cant the forge deploy in like ms? … make the fresh forge experience fantastic". Measured on the first real deploys (test1, test2 on DigitalOcean): about 10 to 12 minutes from deploy to HTTPS. Where it goes, from the boot config and the edge log: droplet create about 1 min; package_update + package_upgrade of a stock Ubuntu image plus installing caddy, bubblewrap, git, nodejs/npm and Claude Code several minutes; the Bun installer; a full git clone of the forge's history at the paced rate about 7 min (#16355); then the certificate.

What done looks like:

  1. A prepared image per cloud: Ubuntu 24.04 with every package, Bun at the pinned version, Claude Code, Caddy and the hardening already in place, built by the forge itself (a snapshot of a machine it booted with a build-only boot config, recorded per provider and region with its date), refreshed weekly and on a Bun or package change. A deploy boots from the newest image, and the boot config then only writes the env, the Caddyfile and the claim hash, fetches one commit (#16355), and starts the unit. No package_upgrade at first boot: unattended upgrades keep it patched afterwards. Stock Ubuntu stays the fallback when no image exists, and the deploy answer says which it used.
  2. The certificate is asked for once the name resolves, not before (the forge writes the record right after the address exists, then Caddy starts), so no failed attempts slow it down.
  3. An optional warm machine per paid plan: one prepared machine already booted and waiting, unclaimed and with no DNS name, so a purchase takes it in seconds (write env and record, start), and a new warm one is made behind it. Off by default; when on, its cost is counted against the cloud account's ceiling and shown beside it.
  4. Each deploy records its timing by stage (create, boot, fetch, first answer, certificate) on the pinned row and on the cloud accounts page, so a regression shows.
  5. A fast local proof for every change to the boot config: the boot replayed in a systemd Ubuntu 24.04 container on the forge's own host (as was done by hand for test1 to find the FORGE_DATA bug), started forge answering /healthz, in the pinned check, so most boot bugs are found in a minute without paying for a machine.

Proof: a deploy from a prepared image answers over HTTPS in under 2 minutes, measured by stage; with a warm machine, a purchase answers in under 30 seconds; the container replay fails on a boot config that cannot start.

Files: src/cloud/machine.ts, src/cloud/droplet.ts, src/cloud/hetzner.ts, src/actions/pinned.ts, scripts/pinned-canary.ts

commented

Owner, 2026-11-24, on the warm machines: "when we are ready for customers we could have like 3 warm and scale that based on demand." So point 3 is a pool, not one machine: a target count per plan (default 0 until sales start; the owner expects about 3), raised and lowered from recent purchase rate, every warm machine counted against the ceiling and shown. Until customers come, cost efficiency comes first: no warm machine by default.

commented

Red on three checks: pull #16363 failed its check 4 times in a row, so no builder starts on it again. The planner is asked to split this smaller or rewrite what done looks like. The last failure:

check failed: gate: rule "small and single-purpose": a feature that goes ahead of the pipeline stays small, and it adds 3 feature files (at most 2); split it into pulls of one purpose each, or change

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs