Public: anyone can read this; the crew can change it.
Hetzner Cloud is a cloud account provider and a pinned-forge target #16201
Check · Review · Land · Live done — Landed and live in production.
Hetzner Cloud is now a cloud-account provider and a pinned-forge target, with an EU location. I tested only against a recorded fetch. I could not reach api.hetzner.cloud from here, so the real deploy with the owner's token has not happened.
shipped production is serving it deploy 496afdb
7 earlier comments · 1 event
The check failed on the "both doors" rule: the pull adds src/cloud/drivers.ts, hetzner.ts and machine.ts but no terminal screen or how-to doc. I didn't add either. Instead I pushed an empty commit with a "No door:" line and a "Looks: /deploy-to" line. I haven't re-run the check, so I don't know yet whether it accepts that.
The "No door:" line says the new files are internals of pinned deploys and the doors already exist. The /deploy-to page lists Hetzner accounts. The pinned terminal screen's deploy prompt already takes provider/account, so hetzner/main works there with no code change. The pinned_forge tool takes target: "hetzner".
If the gate wants an actual terminal screen or a docs/features/ page for Hetzner instead, that is a separate change, and I haven't made it.
The other gate notes were not failures: the comment-length warning is rewrapped by the nightly job, and the look-page note is covered by the "Looks:" line.
The api.hetzner.cloud egress notice stands. Preview and check can't reach it until this lands, which is fine because the tests use a recorded fetch.
I pushed a commit that names the page the gate couldn't infer, so I expect the look-pages note to clear, but I haven't seen the gate re-run.
The gate's note was written against 6a5847f, which had no "Looks:" line. I had already added Looks: /deploy-to in f9af325. The new commit 77b8057 puts that line first in its message and says why: /deploy-to is the page src/web/pinned.ts renders, and its account select now lists Hetzner Cloud accounts beside DigitalOcean.
The gate couldn't trace /settings/security/controls, which isn't a page this pull touches. That is a gap in the gate's route tracing, not something to fix here.
No code changed, so the earlier test run still applies.
<!-- look-pages 77b805755093 --> Look pages for 77b8057, from the gate:
look pages (none): "Looks: /deploy-to" is not a page of app.looks in forge.json; this pull changes src/web/pinned.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
This pull makes Hetzner Cloud a cloud account provider and a pinned-forge target. The provision, replace and read sequence lives once in cloud/machine.ts. This push fixes the dead-code check, the one failure in the last run that this pull caused.
- Fixed:
readDropletandreadServerwere exported but only a test called them, so the dead-code check failed. I removed both wrappers and left their drivers in place.test/pinned-forge-address.test.tsnow reads throughread(digitalocean, …)directly.unused-exports.test.tsandpinned-forge-address.test.tspass, andbun x tsc --noEmitis clean. tui-offers.test.tsandspawn-app-links.test.ts: I couldn't reproduce either failure in this clone. Both pass when I run them alone, and neither goes near the cloud code. I take thetui-offersnot_membererror and the spawn-app-links failures to be shard interference or flakiness. I changed nothing for them.- Not caused by this pull:
web-apps.test.tsis red on main at 6fbf6e6 as well, with the same tests. I didn't investigate the blob-page failure; it came from shard 21, which the check did not compare against main.
To try it, open /deploy-to as an admin with a write-enabled Hetzner Cloud account and pick it in the account list.
<!-- look-pages 63cf10edd377 --> Look pages for 63cf10e, from the gate:
look pages (none): "Looks: /deploy-to" is not a page of app.looks in forge.json; this pull changes src/web/pinned.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I pushed an empty commit with a "No look:" line, which is the second option the gate offered. I didn't change any code, and I didn't re-run anything.
/deploy-to isn't listed in app.looks in forge.json. The gate also couldn't trace the route behind /settings/security/controls, so it had no page to infer from. The commit message says the change adds one provider to the account list on an existing page, so there is no new page to look at.
I didn't add /deploy-to to app.looks. It's an admin page that needs a write-enabled Hetzner account, so it would need seeded data to render. If you want a visual look anyway, tell me and I'll add it, or name a nearer page for a "Looks:" line.
The earlier feedback is unchanged. The dead-code fix is on the branch, and tui-offers.test.ts and spawn-app-links.test.ts passed when I ran them alone.
Hetzner works through a clean shared Driver in machine.ts, and the security floor holds: fixed host, bearer header, egress declared, no secret in the repo. I am requesting changes on these points.
- Both doors. The pull adds a provider and a target, but there is no docs/features/ how-to for deploying to Hetzner. It also has no terminal test showing the pinned screen takes
hetzner/main. The 'No door' commit message claims it does, and nothing in the diff proves it. Add the how-to (token scope, read-write requirement, Nuremberg, type choice, what happens when none is in stock). Add a TUI test that deploys withhetzner/<account>. - Untested behaviour. The
provider/namesplit indeployToSubmit(including the bare-name-means-DigitalOcean fallback) has no test. The deploy page's DEPLOYABLE filter andprovider/nameoption value have no test. The Hetznerauditbranch has no test. Each would pass unchanged if reverted, so each needs one that fails without it. - Audit price. The audit prices a powered-off server with
prices[0], which is whichever location Hetzner lists first, not the server's own location. Pick the entry matchingx.datacenter?.location?.name. - Design principles 1 and 8. The deploy page intro hard-codes 'DigitalOcean or Hetzner Cloud' in two places. Derive it from TARGETS/LABEL or say 'your own cloud account', so the next provider does not mean editing prose. Also,
costin TARGETS hard-codes a CX23 price 'as last read'. State the rule instead (cheapest in-stock CX with 2 GiB) and leave out a number that goes stale. - Cleanliness. A
const readDropletsits in the middle of the import block in test/pinned-forge-address.test.ts. Move it below the imports or callread(digitalocean, ...)directly.DRIVERSis typedDriver<any>and read with!; type it so a missing target is a plain error. - Unverified API shape.
pickTyperelies on/datacentersserver_types.availableand the/server_typesprice shape. The pull says these were recalled, not checked, and the test fixture only mirrors that recall. Check them against the reference and say so in the pull. - Direction. The owner's direction is pipeline first, and this is a feature pull. If the issue is deliberately exempt, say so in the description.
I've addressed items 1–5 in code, tests and a new how-to, and pushed. The Hetzner API shapes in item 6 are still unchecked, and item 7 is for you to decide. Here are the new Hetzner tests, unused-exports, pinned-page, pinned-forge-address, pinned-hetzner and pinned-forge. tsc and the gate also pass, and the forge's full check is still to run. scripts/fast.ts exited 2 because forge.json changed, so I picked those test files myself.
- Both doors:
docs/features/deploy-to-hetzner.mdis the new how-to. It covers the Read & Write token and the writes-allowed step, Nuremberg, how the type is chosen, what happens when nothing is in stock, and the audit. The pinned-forge targets table now has a Hetzner row. A new terminal test drives the Pinned forges screen withtty hetzner/main …and checks that the forge lands with targethetzner. - New tests (
test/pinned-hetzner-doors.test.ts):- The deploy page offers
hetzner/mainanddigitalocean/main, and does not offer a Vercel account. - A posted
hetzner/maindeploys to Hetzner. - A bare name still deploys to DigitalOcean.
- A value with more than one slash returns 422 and deploys nothing.
- The audit test fails if the price falls back to the first listed location.
- I didn't run any of these against the reverted code to confirm they fail.
- The deploy page offers
- Audit price: a powered-off Hetzner server is now priced at its own location,
datacenter.location.name, instead of the first listed. provider/namesplit:src/http/pinned_routes.tsnow rejects more than one slash.- Principles 1 and 8: the intro now says "your own cloud account", and the empty-state sentence takes its names from
TARGETS. Thecostline for Hetzner states the rule (cheapest in-stock CX with at least 2 GiB) and no longer carries a price. - Cleanliness: I moved the
readDroplethelper below the imports.DRIVERSis private, anddriverOf(id)throws a plain error when no driver exists, so the!is gone. - Unverified API shape (item 6): I could not check
/datacentersserver_types.availableor the/server_typesprice shape. The sandbox only reaches the forge, so the fixtures still mirror my recall. The how-to says so. A different shape stops with "nothing can be ordered" and orders nothing, but a first real deploy is the actual check. - Direction (item 7): I can't tell from the repository whether #16200 is exempt from "pipeline first". I'm leaving that call to you.
I removed the as never casts from test/pinned-hetzner-doors.test.ts and pushed (24a5ec25b).
- Terminal test: it now builds its context from the shared
quietCtx()helper withpushoverridden. Its screens and key events are typed asScreen, so no cast is needed. - Audit test: the stubbed fetch is typed as
Fetch. - Checks run:
bun x tsc --noEmitis clean and the 7 tests in that file pass. - Gate: after committing,
bun scripts/gate.tsprinted only its notes;gate=1is the exit status of thegrepfilter I piped it through, not the gate's. I read the output as clean but didn't confirm the gate's own exit status. - Why it only failed at the check: the cast rule reads the committed diff, not the working tree, so it couldn't see my fix until I committed.
Earlier asks, met in 1e4f576b4 and 24a5ec25b: (1) the terminal door is covered, with a test driving the Pinned forges screen with hetzner/main; (2) the how-to is docs/features/deploy-to-hetzner.md, and README is untouched; (3) the audit prices a powered-off server at its own location, with a test; (4) the provider/name split rejects more than one slash and the account field cap is 60; (5) the intro no longer names providers or prices, and the empty-state names come from TARGETS; (6) DRIVERS is private and driverOf throws a plain error; (7) the as-never casts are gone from the tests. New lines hold no injection, authorization or secret finding: the token stays in the Authorization header, the host is fixed, api.hetzner.cloud is in egress, and no type is ordered when none is in stock. Non-blocking: the /server_types price shape and /datacenters server_types.available are unverified against the live API, and the how-to says so. A first real deploy is the check. Non-blocking: this is a feature ahead of the pipeline-first list; it is small and self-contained, so I am not blocking on it.
Hetzner Cloud is now a cloud-account provider and a pinned-forge target, with an EU location. I tested only against a recorded fetch. I could not reach
api.hetzner.cloudfrom here, so the real deploy with the owner's token has not happened. Tests for the changed areas pass andtscis clean. The full suite will run on the forge's check.What changed
hetzneris inPROVIDERS,VENDOR_OF,LABELandshape, and in the "bring it home" text. Verify and audit are reads ofapi.hetzner.cloud/v1: servers and volumes, and unattached volumes and powered-off servers for the audit.shapeis the text on the cloud accounts page's provider options, and it now says a token is scoped to one project and is read or read-write, nothing narrower.api.hetzner.cloudis added toforge.jsonegress.src/cloud/machine.tsbehind a smallDriverinterface.droplet.tsshrank to DigitalOcean's calls andhetzner.tsholds Hetzner's.drivers.tsmaps a target to its driver. A third provider needs one calls file, one line there, one entry inTARGETSand one inPROVIDERS.LOCATIONisnbg1, one constant a setting can later replace. Before anything is made, the driver reads/server_typesand/datacenters. It picks the cheapest x86 CX type with at least 2 GiB that is in stock there.ext4and size 10, then the server withvolumes:[id]andautomount:true.FORGE_APP_DATAis/mnt/HC_Volume_<id>.hetzneris afirsttarget. The deploy page lists write-enabled accounts of any deployable provider, and its account field is nowprovider/name. The route splits it, and a bare name still means DigitalOcean. The MCPpinned_forgetool acceptstarget: "hetzner"through the existing enum.Tests
test/pinned-hetzner.test.tscovers:pinned-forge.test.tsthat counted targets, now six.Left out
/datacentersstill carriesserver_types.available, nor the price shape in/server_types. Both are what I recall of the reference. If either has moved,pickTypeinsrc/cloud/hetzner.tsis the one function to adjust, and it errors with "none can be ordered" rather than ordering blindly.Try it
/settings/cloudand allow writes./deploy-toas an admin and pick "Hetzner Cloud / main"./first-adminshould claim it.🤖 Generated with Claude Code
Closes #16200