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

Places: one catalog of where a forge can live, with its datacenter and its re… #16203

shipped production is serving it opened this has it

Landed in pull #16241 · 2 runs · run

opened this

Places: one catalog of where a forge can live, with its datacenter and its real monthly cost

The owner wants to sell forges that each run on their own machine, default to the best place without asking, and let a curious buyer choose the datacenter and see what it costs. "We would need a great interface and solid APIs."

Today src/cloud/targets.ts lists providers with a price written in prose, and the driver holds one region and one size as constants. Replace that with one catalog, and delete what it replaces in the same change.

What done looks like:

  1. A place is provider + datacenter + machine size, with: vCPU, memory, disk, included traffic, a location a person recognises (city, country), its monthly cost in cents (machine + the forge's volume + public address), the date that cost was read, and whether it can be ordered now. Each driver supplies its places from the provider's own API where the API gives prices and availability (DigitalOcean sizes and regions; Hetzner server types, prices and per-location availability once #16200 lands); nothing is typed in by hand that an API can answer. Costs refresh on a schedule and the last good read is kept when a provider is down.
  2. Each plan (small, medium, large) maps to the minimum machine it needs. The default place for a plan is chosen by one rule the owner can read on the page: the cheapest place in the United States that can be ordered now and meets the plan's minimum, among providers with an attached account that allows writes. A setting can pin the default.
  3. API: one read route lists places (filter by plan, provider, country; each with cost, read date, orderable, and which one is the default), and deploy takes a place id. The same through the pinned_forge tool. Stable ids, typed responses, documented with the other public routes. A place that cannot be ordered answers with why, not a failure half-way through a deploy.
  4. Interface: buying or deploying a forge shows one sentence — where it will run and why that is the default — and a "Choose where it runs" disclosure. Inside: places grouped by region, each with city, provider, machine, cost a month and traffic included; unavailable ones shown as unavailable with the reason. No provider jargon in the default path; the curious path is complete. Phone width works.
  5. The owner's page for places shows cost beside the plan's price, so the margin per place is one glance.

Proof: tests for the default rule (cheapest orderable US place, pin wins, nothing orderable says so), for a stale provider keeping its last read, and for the route's shape. A person can change the place and see the cost change before paying.

Not here: taking payment for the chosen place, and discount codes; those are their own changes and depend on this catalog.

commented

From the owner, 2026-11-23: "i am american. I want USD. live conversions would be cool too tho or just using the vendor's pricing." So for the catalog:

  • Every amount a person sees is US dollars: places, plan margins, the ceiling on a cloud account, the at-cost price. No euro figure on any page, tool answer or terminal screen.
  • The vendor's own price is the source wherever its API gives one (Hetzner's pricing endpoint, DigitalOcean's sizes), read on the catalog's schedule, never typed in.
  • A vendor that prices in another currency is converted at a daily reference rate the forge fetches itself (the European Central Bank publishes one with no key), kept with its date; when the fetch fails the last good rate stands and the page says how old it is. Each place keeps the vendor's amount and currency beside the dollar figure in the data, so the conversion can be shown on the curious path ("€5.99 at 1.08 on 24 Nov") and re-done when the rate moves.
  • One conversion function for the whole forge. A change adding a spend ceiling per cloud account is landing with a fixed, deliberately high rate behind a single function (src/cloud/prices.ts); this issue replaces that constant with the live rate and deletes the constant. Where a figure guards spending (the ceiling), round against the owner: up.
  • If a vendor will bill the account in dollars, use the account's own currency from its API and convert nothing.
commented

Red on three checks: pull #16241 failed its check 3 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:

a child writing 200 MB stays blocked while nobody reads, and memory stays bounded

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs