Public: anyone can read this; the crew can change it.
A deploy never makes two machines for one forge, a forge can be retired, and… #16558
Check · Review · Land · Live — Its check is red.
A deploy now adopts a machine or volume that already exists instead of making a second one, and sold forges boot only a pinned commit with a checksum-verified Bun. I added a read-only way to list what bills with no row, and a selling account is now refused to runs.
stopped failed before it answered — 28853 passed, 2 failed: fetch timeouts > every fetch in src carries a signal or a reason, /forges/new: where it runs > an admin's cloud forge at a chosen place is a $0 order with no checkout, and goes to its making page with the claim link deploy a5890e7
Check failed: fetch timeouts > every fetch in src carries a signal or a reasonCheck of a5890e7checked against main at 4b13b3bfast tier: red in 24m32s
Website spec: 25 findings (report only)
- /board http://127.0.0.1:40805/board answered 303 — https://specification.website/
- /notes http://127.0.0.1:40805/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:40805/review answered 303 — https://specification.website/
- /system http://127.0.0.1:40805/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:40805/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:40805/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:40805/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:40805/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:40805/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:40805/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:40805/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:40805/settings/crew?help answered 303 — https://specification.website/
- /settings/captain http://127.0.0.1:40805/settings/captain answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:40805/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:40805/settings/grants answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/drop http://127.0.0.1:40805/preview-admin/sample/drop answered 303 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:40805/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:40805/preview-admin/sample/cut-over answered 303 — https://specification.website/
- /preview-admin/sample/next?pick expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/space the first focusable element is not a skip link (an in-page #target link) — skip-link
- /looks/missing http://127.0.0.1:40805/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:40805/looks/failed answered 500 — https://specification.website/
Look
9 pages beside main · 0 new to this pull
/apps
In the dark
at a5890e7 ·
/changelog
In the dark
at a5890e7 ·
/docs
In the dark
at a5890e7 ·
/explore
In the dark
at a5890e7 ·
/looks/failed
In the dark
at a5890e7 ·
/looks/missing
In the dark
at a5890e7 ·
/notes
In the dark
at a5890e7 ·
/review
In the dark
at a5890e7 ·
/security
In the dark
at a5890e7 ·
3 earlier comments
A deploy now adopts a machine or volume that already exists instead of making a second one, and sold forges boot only a pinned commit with a checksum-verified Bun. I added a read-only way to list what bills with no row, and a selling account is now refused to runs. Not done: a keep period for retire, a retire for strays, and a check that a sold forge can actually clone from its source.
Tests pass: the 28 related test files plus the new test/pinned-one-machine.test.ts (337 tests), tsc --noEmit, scripts/gate.ts --fix and design-lint. The forge's full check runs on this push. I did not run a real boot or deploy: the sandbox reaches no provider, so every cloud call is against a recorded fetch.
What changed
- One machine per forge. Before creating, the driver looks the volume and machine up by name (Hetzner by name and label, DigitalOcean by name and tag, volumes also by datacenter) and adopts what it finds. This is in
provisionandreplaceinsrc/cloud/machine.ts, withfindVolume/findMachinein both drivers. An answer with no usable id now throws; before, it recorded a machine id of"". - Retire (machine first, volume only on a second
withData, apinned.retiredevent) was already there on the tool, route and page. I addedstrayson thepinned_forgetool, backed bystrayCloudinsrc/actions/pinned.ts. It lists machines and volumes at the provider that carry the forge's label and belong to no row, and deletes nothing. It is tool-only, so it needs no new openapi route. - Ids and addresses. Hetzner ids go through
numericId, so an empty string is no longer 0.ipv4()now keeps only a public address: private, loopback, link-local, carrier-grade, benchmarking, multicast, reserved and leading-zero forms are refused. I kept TEST-NET addresses valid because the existing fixtures use203.0.113.9. - Bun. The boot no longer pipes
bun.sh/installinto a shell. It runs a script that downloads@oven/bun-linux-<arch>from the npm registry and installs it only if its sha512 matches a pin insrc/cloud/bun_install.ts. I took the 1.4.4 hashes from registry metadata and did not download the 107 MB packages to hash them myself. A test fails if.bun-versionmoves without matching pins. - Sales. A paid order takes a 40-hex commit only, from a host in
FORGE_SALE_SOURCES, and never from the selling forge's own host.FORGE_SALE_SOURCEis the git address a sold forge boots from and follows for updates. An empty list means no sale deploys. An admin's own deploy keeps the wider rule. This applies at checkout (room) and at deploy (deployForOrder). - Selling account. Only
barandhandOutinsrc/cloud/gate.tsgive a run a cloud token, and only whencloud.jsondeclares the vendor. The account named by "paid forges run on", and any account a pinned row records, is now refused whatevercloud.jsonsays (audited ashand-out:selling). Every otherresolveSecretscaller is a forge-side action, not a run. That covers places refresh, DNS, the cloud watch and snapshots, and none of them reaches a hosted forge's run.
Tests
- New tests cover:
- a lost machine-create response then a retry (one machine, both clouds), and the same for a lost volume;
- retire;
- strays;
- private addresses and digit-only ids;
- tag and unlisted-host refusal for a sale;
- the selling account refused to a run;
- the Bun pin.
- The recorded-cloud helper is now stateful and has a
lostfault. Existing sequence assertions in the pinned, Hetzner, recovery and harden tests gained the lookup calls. order-cloudandone-doornow setFORGE_SALE_SOURCESandFORGE_SALE_SOURCE.
Not done
- Source reachability.
trevato/forgeis private, so an anonymous clone returns 404, andownCodealready refuses a private source. A sale therefore needs the owner to publish a mirror and setFORGE_SALE_SOURCEandFORGE_SALE_SOURCES. Until they do, sold forges are refused at checkout with a sentence saying so. I could not check that any mirror is cloneable by a fresh machine. - Retire. No keep period; the second-word rule covers it.
- Strays. Each list reads one page of up to 50 (Hetzner) or 200 (DigitalOcean) items.
- Reuse.
bun scripts/similar.tswas not run. I extendedretire,replace,provisionand theDriverinterface in place instead of adding a parallel path.
Try it
- Set
FORGE_SALE_SOURCES=<host>andFORGE_SALE_SOURCE=https://<host>/<owner>/<repo>.git. - Set "paid forges run on" to a cloud account, then buy a forge.
- As an admin, call the
pinned_forgetool with{verb:"strays", target, account}to list what bills with no row.
[
{"go":"MCP tool pinned_forge {verb:\"strays\", target:\"hetzner\", account:\"main\"}","look":"the says line","expect":"names machines and volumes at the provider that carry a forge's label and belong to no row, or says none"},
{"go":"MCP tool pinned_forge {verb:\"deploy\", ...} with a deploy that times out after the provider made the machine, then deploy again","look":"the provider's machine list","expect":"one machine for the forge, and the row names it"}
]
🤖 Generated with Claude Code
I merged main into the branch, resolved the one conflict, and pushed. The cloud and machine tests pass (404 across 42 files) and bun x tsc --noEmit is clean. I did not run the full suite or the gate's rule checks; the forge's check runs them on this push.
src/cloud/machine.ts:main'searlyboot commands and this branch'sBUN_INSTALLERstep now both stay inbootConfig. Theearlycommands run first, then the installer.- OVHcloud driver:
mainadded OVHcloud, which had nofindMachine,findVolumeorlistForges, so type-checking failed.src/cloud/ovh.tsnow implements all three, and a deploy there looks for an existing instance and volume before creating one. listForgeson OVHcloud: it scans both US regions and matches instances namedforge-*and volumes whose description startsforge:. No test exercises it; the fake intest/pinned-ovh.test.tsreturns empty lists.test/pinned-ovh.test.ts:- The recorded OVHcloud fake now answers the new volume and instance list calls.
- The expected call sequences include the two new
GETcalls. - The mkfs-before-install check now looks for the installer command, because the boot config no longer contains the
curlline.
bun scripts/gate.ts still reports "both doors", "name the issue" and env-restore findings on this branch. I did not look into whether they predate the merge.
<!-- look-pages 0a5730d13a7a --> Look pages for 0a5730d, from the gate:
look pages (inferred): this pull changes src/web/chrome.ts, src/web/comments.ts, src/web/diff-view.ts and 2 more; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
This push only clears the three gate refusals that failed pull #16558. The one-machine change itself is untouched. bun scripts/gate.ts --explain now shows no failures; the remaining notes are over-wide comments and two similar-function warnings, which it says need no action. bun x tsc --noEmit printed nothing, which I read as clean. I ran four test files, which pass: one-door, order-cloud, pinned-ceiling and pinned-one-machine. scripts/fast.ts said the diff reaches 3,629 test files, so I picked those four myself rather than run the whole suite. The forge runs the full check on this push.
- Rewrap noise: an earlier
gate.ts --fixhad rewrapped comments this pull did not write. I restored 16 files tomain's version, since their only differences were rewrapped comments.test/pinned-ceiling.test.tskeeps its real change (straysallowed as a baredriverOfuse, count 7 → 8), and I undid only its rewrap. - Environment restores: the
FORGE_SALE_SOURCESandFORGE_SALE_SOURCElines intest/one-door.test.tsandtest/order-cloud.test.tsare already undone inafterAll. I marked each set and delete with// env-restored:for the gate. - Both doors: I chose a
No door:line in the commit message over a new terminal screen or feature page.bun_install.tsandsale_source.tsare deploy-time guards with no screen of their own, anddocs/features/pinned-forge.mdalready covers the pinned forge. This is a judgement call if a reviewer wants a how-to page instead.
I did not touch the two similar-function notes (isPublic and answer).
No page changes, so there is no review block.
🤖 Generated with Claude Code
A deploy now adopts a machine or volume that already exists instead of making a second one, and sold forges boot only a pinned commit with a checksum-verified Bun. I added a read-only way to list what bills with no row, and a selling account is now refused to runs. Not done: a keep period for retire, a retire for strays, and a check that a sold forge can actually clone from its source.
Tests pass: the 28 related test files plus the new
test/pinned-one-machine.test.ts(337 tests),tsc --noEmit,scripts/gate.ts --fixanddesign-lint. The forge's full check runs on this push. I did not run a real boot or deploy: the sandbox reaches no provider, so every cloud call is against a recorded fetch.What changed
provisionandreplaceinsrc/cloud/machine.ts, withfindVolume/findMachinein both drivers. An answer with no usable id now throws; before, it recorded a machine id of"".withData, apinned.retiredevent) was already there on the tool, route and page. I addedstrayson thepinned_forgetool, backed bystrayCloudinsrc/actions/pinned.ts. It lists machines and volumes at the provider that carry the forge's label and belong to no row, and deletes nothing. It is tool-only, so it needs no new openapi route.numericId, so an empty string is no longer 0.ipv4()now keeps only a public address: private, loopback, link-local, carrier-grade, benchmarking, multicast, reserved and leading-zero forms are refused. I kept TEST-NET addresses valid because the existing fixtures use203.0.113.9.bun.sh/installinto a shell. It runs a script that downloads@oven/bun-linux-<arch>from the npm registry and installs it only if its sha512 matches a pin insrc/cloud/bun_install.ts. I took the 1.4.4 hashes from registry metadata and did not download the 107 MB packages to hash them myself. A test fails if.bun-versionmoves without matching pins.FORGE_SALE_SOURCES, and never from the selling forge's own host.FORGE_SALE_SOURCEis the git address a sold forge boots from and follows for updates. An empty list means no sale deploys. An admin's own deploy keeps the wider rule. This applies at checkout (room) and at deploy (deployForOrder).barandhandOutinsrc/cloud/gate.tsgive a run a cloud token, and only whencloud.jsondeclares the vendor. The account named by "paid forges run on", and any account a pinned row records, is now refused whatevercloud.jsonsays (audited ashand-out:selling). Every otherresolveSecretscaller is a forge-side action, not a run. That covers places refresh, DNS, the cloud watch and snapshots, and none of them reaches a hosted forge's run.Tests
lostfault. Existing sequence assertions in the pinned, Hetzner, recovery and harden tests gained the lookup calls.order-cloudandone-doornow setFORGE_SALE_SOURCESandFORGE_SALE_SOURCE.Not done
trevato/forgeis private, so an anonymous clone returns 404, andownCodealready refuses a private source. A sale therefore needs the owner to publish a mirror and setFORGE_SALE_SOURCEandFORGE_SALE_SOURCES. Until they do, sold forges are refused at checkout with a sentence saying so. I could not check that any mirror is cloneable by a fresh machine.bun scripts/similar.tswas not run. I extendedretire,replace,provisionand theDriverinterface in place instead of adding a parallel path.Try it
FORGE_SALE_SOURCES=<host>andFORGE_SALE_SOURCE=https://<host>/<owner>/<repo>.git.pinned_forgetool with{verb:"strays", target, account}to list what bills with no row.🤖 Generated with Claude Code
Closes #16219