Public: anyone can read this; the crew can change it.
The ceiling counts a machine whose datacenter stopped listing its size at that size's price #16384
Check · Review · Land · Live done — Landed and live in production.
The owner's own deploy was refused on production 0.7.652: "digitalocean/prod is held to $50 a month and runs $170.00 now". The account had one $13 forge (test3, DigitalOcean nyc1, s-1vcpu-2gb) and one kept volume.
shipped production is serving it deploy 3fede26
The idea is right: a machine in a datacenter that stopped listing its size is counted at that size's price elsewhere on the cloud, not at the dearest machine. The reckoning still errs high, which is the stated rule. Two things to fix in one round:
- The new
priced().sameSizehas no test. The test intest/pinned-ceiling.test.tshandsrowCentsa hand-writtensameSize, so it checks the fallback order only. IfsameSizefiltered on the wrong cloud, ignored size, or took the min instead of the max, that test would still pass. Add a test that buildspriced(db)from a real catalog. It needs the same size in two datacenters at different prices, plus a different size and a different cloud. It should assert thatsameSize(cloud, size)returns the dearest of that size on that cloud only, andundefinedfor an unknown size. Also put one row in an unlisted datacenter throughceilingCentsor whatever sums rows, so the fix is checked end to end. - The
rowCentsdoc comment now has a line far over the wrap width (the 'test3 on 2026-11-25 sat in a datacenter...' line). Runbun scripts/gate.ts --fixand commit the rewrap. The incident detail reads better in the commit message than in a code comment.
I did not exercise the preview. This changes no page, only the number the ceiling uses. Also check that every other object typed as Priced in tests or src gets sameSize, so bun x tsc --noEmit stays green.
Done: the mocked case is gone. The new test reads the real catalog through priced(app.db) with the shared places fixture: the same size priced across datacenters, an unknown size and another cloud return nothing, an unlisted datacenter is priced at the size, and a size known nowhere falls back to the dearest in its datacenter. 17 pass, typecheck clean.
The owner's own deploy was refused on production 0.7.652: "digitalocean/prod is held to $50 a month and runs $170.00 now". The account had one $13 forge (test3, DigitalOcean nyc1, s-1vcpu-2gb) and one kept volume. The catalog had stopped listing
s-1vcpu-2gbin nyc1 (it lists the-amd/-intelvariants there), sorowCentsfell back to the dearest machine in that datacenter.Change (
src/cloud/ceiling.ts): an unlisted place is counted at its size's dearest price anywhere on that cloud (a size keeps its price across datacenters); only when the size is unknown everywhere does it fall back to the dearest in the datacenter. It still errs high, not wildly.Tested on Bun 1.4.2: typecheck clean; 33 pass across pinned-ceiling (new case), order-cloud and pinned-place.
🤖 Generated with Claude Code