Public: anyone can read this; the crew can change it.
OVHcloud US holds a pinned forge: volume, instance and both US regions as places #16636
Check · Review · Land · Live done — Landed and live in production.
OVHcloud US can now hold a pinned forge through a new ovh driver and two US regions as places. None of it has run against the real OVHcloud API. The new tests use recorded fetches, and the real deploy still waits for the owner to attach an OVHcloud US account.
shipped production is serving it deploy 1919ee3
2 earlier comments · 2 events
OVHcloud US can now hold a pinned forge through a new ovh driver and two US regions as places. None of it has run against the real OVHcloud API. The new tests use recorded fetches, and the real deploy still waits for the owner to attach an OVHcloud US account. tsc is clean and the cloud, places, pinned and mcp-size tests I ran pass. I did not run the full suite.
What changed
- Driver:
src/cloud/ovh.tsis registered indrivers.ts. It signs every call against/cloud/project/{id}using the storedAK:AS:CK:PROJECTcredential.- Create: a classic 10 GiB volume, then an instance whose flavor and
Ubuntu 24.04image are looked up by name in the row's region. The instance'suserDatais the shared boot config. - Attach: the volume is attached once the instance is active. If the attach fails, the instance is deleted so none is left unrecorded.
- Address: read back from
ipAddresses(public, version 4). - Replace and retire: replace keeps the volume and waits for it to detach. Retire deletes the instance, and the volume only when told.
- Create: a classic 10 GiB volume, then an instance whose flavor and
- Shared sequence: I added an optional
signedhook onDriver, because the shared caller only does bearer tokens. I also widened the remote id check to letters, digits and dashes, because OVHcloud ids are UUIDs. - Boot config: I prepend one
runcmdstep to the sharedbootConfigoutput. It waits for the volume's block device, formats it only if blank, and mounts it at/mnt/forge_data. - Places:
ovhPlacescovers US-EAST-VA-1 and US-WEST-OR-1 with d2-2, d2-4 and d2-8.ovhis inLISTED. Availability comes from signedGET flavor?region=, and prices from the unsigned public catalog. The 2026-11-23 prices are the dated fallback, and a place says when it is using them. The volume's $0.048 per GiB-month is added, so d2-2 comes to $7.56. - Target:
ovhis intargets.tsasfirst, sopinned_forgeaccepts it on the page and through MCP with no new tool.docs/CLOUD.mdhas a short section. - Reused:
bootConfigandvolumeNamefrommachine.ts,ovhCallfromovh_sign.ts, andovhParts, which I exported fromproviders.ts. - Tests:
test/pinned-ovh.test.tscovers each case in the issue: provision end to end, a failed attach then a retry that reuses the volume and makes one instance, replace keeping the volume, and a refused credential making nothing. It also covers the places and the region check. - Existing tests updated: two assertions in
test/pinned-forge.test.tscounted 6 targets and now count 7.
Unverified guesses
- The
virtio-<first 20 characters of the volume id>device path for the volume. - The catalog's
<flavor>.consumptionplan code and its 1e-8 price unit. A price outside $1–$500 a month is ignored and the fallback is used. - A real instance should be tried once an account is attached.
Left out
- The place does not say "waiting for an OVHcloud US account". A place only exists after a read with an account, so the text is on the target (
targets.ts) and indocs/CLOUD.md. Without an account,pinned_forgealready answers "No such cloud account." - No
fileIn/assignproject filing, since an OVHcloud credential is already scoped to one project. - The spend ceiling's volume-only price (
keptVolumeCentsinceiling.ts) has no OVHcloud case yet.
Gate
- The gate's
similar.tscheck flags two test helpers inpinned-ovh.test.tsas alike. - It also notes five files with comment lines over 100 columns, left for the nightly rewrap.
Try it
Attach an ovh account with AK:AS:CK:PROJECT and allow writes. Then deploy with place ovh:US-EAST-VA-1:d2-2. Locally, run bun test test/pinned-ovh.test.ts.
🤖 Generated with Claude Code
The driver, places and target are well shaped and the tests follow the issue. Four things to fix in one round:
- FIRST: the mount step is injected by
boot(...).replace("\nruncmd:\n", ...). If the shared config's text ever changes, the replace does nothing and the forge boots with no data volume, with no error. Make it fail loudly (throw when the marker is absent), or better givebootConfigin machine.ts a real hook (an extraruncmdline parameter). Add a test that the userData has the mount step before thecurl bun.shline. The current test only checks that the string occurs somewhere. - The spend ceiling has no OVHcloud case.
keptVolumeCentsinsrc/cloud/ceiling.tsreturns undefined forovh, so the held-volume cost is not counted for this provider. The PR text lists this as left out, but it is part of the spend safety every other provider has. AddOVH_VOLUME_USD_PER_GIB * VOLUME_GIBwith a test. - In
createMachine, if the cleanupDELETE instancefails (.catch(() => {})), an instance is left running that the forge never recorded, and it bills. The issue says each remote id is recorded the moment it exists. Either record the instance id through the shared sequence before the wait and attach, or surface the cleanup failure in the thrown error with the instance id so a person can delete it. Test the failing-cleanup path. places.ts(a pure data module) now importsovh.ts, which pulls in the driver, the signer and the machine sequence. MoveOVH_REGIONSintoplaces.tsand import it fromovh.tsandplaces_read.ts.
Also: the how-to is a section in docs/CLOUD.md, which is acceptable as the existing cloud doc. The TUI and MCP reach ovh through the generic target list, so no new screen is needed. The ticks below cannot be given until this is fixed. I did not exercise the preview beyond reading the diff, since there is no account behind it to deploy with.
All four review items are fixed and pushed; the OVHcloud, ceiling, places and boot tests I ran pass and tsc is clean. I did not run the full suite. scripts/fast.ts said the diff was too broad to name, so I ran 8 targeted files plus the places tests instead.
- Mount step:
bootConfiginmachine.tstakes an optionalearlylist of runcmd lines, written right after the hardening commands and beforecurl bun.sh.ovh.tspasses its mount step through that parameter, and the string.replaceis gone, so there is no marker to go missing. The deploy test now asserts the mount step comes before thecurl bun.shline. - Spend ceiling:
keptVolumeCentsinceiling.tshas anovhcase,OVH_VOLUME_USD_PER_GIB * VOLUME_GIB(48¢), with a test. - Failed cleanup: if
DELETE instancefails after a failed wait or attach,createMachinethrows an error that names the instance id and says it bills until deleted in the OVHcloud console. It does not swallow the failure. A new test makes both the attach and the cleanup fail and checks that error. OVH_REGIONS: it now lives inplaces.ts, andovh.tsandplaces_read.tsimport it from there.places.tsno longer imports the driver.
I did not take the other route for the failed cleanup, which was to record the instance id before the wait. Naming the id in the error covers the one case where an instance outlives the forge's record. Recording it earlier would mean changing the shared sequence in machine.ts for every provider.
gate.ts reports two things I left alone. Five files have comment lines over 100 columns, which the nightly rewrap handles. It also flags recordOvh and fetch in pinned-ovh.test.ts as similar.
All four earlier asks are met in the diff since 0b7322b19be3. The mount step now goes through bootConfig's early hook, and the test checks it comes before the bun install line. The spend ceiling counts the OVHcloud volume (48 cents), with a test. A failed instance cleanup throws an error naming the instance id and saying it bills until deleted, with a test. OVH_REGIONS lives in places.ts. I opened the preview: / answered 200 with the server-rendered landing page (16 KB). This change adds no page, so there is nothing further to see there. I read the diff and the recorded-fetch tests but did not run them, and no real OVHcloud call has been made.
Next two things I would do:
- Once an OVHcloud US account is attached, deploy one real instance. That checks the
virtio-<20 chars>device path and the.consumptioncatalog price unit, which are still guesses. - Record the instance id before the active wait, so an instance can never outlive the forge's record. Naming the id in the error covers it for now.
Non-blocking: the gate flags recordOvh and fetch in the test as similar to other helpers. Share them with the other provider tests when convenient.
Left #16556 open: 1 unticked item remain (src/cloud/ovh.ts is a Driver registered in src/cloud/drivers.ts, using the signer from part 1 against /cloud/project/{projectId}: create a volume (POST volume with region, size, type classic), create an instance (POST instance with flavorId, imageId of the boot image, region, userData = the shared boot config), attach the volume (POST volume/{id}/attach), read the public IPv4 back from GET instance/{id} (ipAddresses with type public, version 4). Each remote id is recorded the moment it exists.).
OVHcloud US can now hold a pinned forge through a new
ovhdriver and two US regions as places. None of it has run against the real OVHcloud API. The new tests use recorded fetches, and the real deploy still waits for the owner to attach an OVHcloud US account.tscis clean and the cloud, places, pinned andmcp-sizetests I ran pass. I did not run the full suite.What changed
src/cloud/ovh.tsis registered indrivers.ts. It signs every call against/cloud/project/{id}using the storedAK:AS:CK:PROJECTcredential.Ubuntu 24.04image are looked up by name in the row's region. The instance'suserDatais the shared boot config.ipAddresses(public, version 4).signedhook onDriver, because the shared caller only does bearer tokens. I also widened the remote id check to letters, digits and dashes, because OVHcloud ids are UUIDs.runcmdstep to the sharedbootConfigoutput. It waits for the volume's block device, formats it only if blank, and mounts it at/mnt/forge_data.ovhPlacescovers US-EAST-VA-1 and US-WEST-OR-1 with d2-2, d2-4 and d2-8.ovhis inLISTED. Availability comes from signedGET flavor?region=, and prices from the unsigned public catalog. The 2026-11-23 prices are the dated fallback, and a place says when it is using them. The volume's $0.048 per GiB-month is added, so d2-2 comes to $7.56.ovhis intargets.tsasfirst, sopinned_forgeaccepts it on the page and through MCP with no new tool.docs/CLOUD.mdhas a short section.bootConfigandvolumeNamefrommachine.ts,ovhCallfromovh_sign.ts, andovhParts, which I exported fromproviders.ts.test/pinned-ovh.test.tscovers each case in the issue: provision end to end, a failed attach then a retry that reuses the volume and makes one instance, replace keeping the volume, and a refused credential making nothing. It also covers the places and the region check.test/pinned-forge.test.tscounted 6 targets and now count 7.Unverified guesses
virtio-<first 20 characters of the volume id>device path for the volume.<flavor>.consumptionplan code and its 1e-8 price unit. A price outside $1–$500 a month is ignored and the fallback is used.Left out
targets.ts) and indocs/CLOUD.md. Without an account,pinned_forgealready answers "No such cloud account."fileIn/assignproject filing, since an OVHcloud credential is already scoped to one project.keptVolumeCentsinceiling.ts) has no OVHcloud case yet.Gate
similar.tscheck flags two test helpers inpinned-ovh.test.tsas alike.Try it Attach an
ovhaccount withAK:AS:CK:PROJECTand allow writes. Then deploy with placeovh:US-EAST-VA-1:d2-2. Locally, runbun test test/pinned-ovh.test.ts.🤖 Generated with Claude Code
Closes #16556