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

A deployed forge can be retired: its machine and record go, its data only when told #16338

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Part of #16219. A deployed forge could not be retired, so a test forge or a cancelled one billed forever. What changed retire on the pinnedforge tool, the API route, the Pinned forges page (through the confirm page; deleting the data asks for the forge's name) and the terminal (x).

Notes

shipped production is serving it deploy 3fede26

opened this

Part of #16219. A deployed forge could not be retired, so a test forge or a cancelled one billed forever.

What changed

  • retire on the pinned_forge tool, the API route, the Pinned forges page (through the confirm page; deleting the data asks for the forge's name) and the terminal (x).
  • Retire deletes the machine and the DNS record the forge wrote, and keeps the data volume by default, saying what keeping it costs. withData deletes the volume too; the tool is marked destroy-data for that case.
  • The row ends retired and counts toward the ceiling only at the kept volume's price. A machine or volume already gone at the provider is success.
  • A forge its buyer has claimed is refused unless despiteClaim says the owner means it.
  • scripts/pinned-canary.ts now retires its canary with its data at the end of every run, pass or fail (--keep leaves it), and exits 1 with the ids if cleanup fails. It checks the forge's own list afterwards, not the provider's.

Tested Built by a subagent; run by me on Bun 1.4.2 on top of the DNS change: typecheck clean, 369 pass and 0 fail across the pinned, places, MCP size, llms budget, openapi-errors, doors, replaces, delete-tier, schema and first-admin files, including those that need a listening socket. Not proven on a real machine: DigitalOcean may refuse a volume delete seconds after its droplet's; the row then reads retired with the data kept, and asking again finishes it.

🤖 Generated with Claude Code

Changes requested

Retire is well built: the machine and the DNS record go, the volume stays unless withData, a retire can be asked again, a claimed forge is refused without despiteClaim, and the ceiling counts a retired forge at its volume's price. All four doors are there (API, MCP tool in the delete tier, /pinned, x in the terminal), the how-to is in docs/features/pinned-forge.md, README is untouched, and the tests are thorough. I read the diff, not the preview; the diff I was given was cut at the test files, so I read none of the new tests' bodies.

One change to make, and it touches a Never (data is deleted only with a red button and the person typing its name): the typed name is not checked on the server. The confirm page asks for the forge's name in the browser, but POST /pinned/:name/retire-data deletes the volume without seeing it. The API's withData: true is a bare boolean. A forged or replayed POST, or a script holding an admin session or token, deletes a buyer's data with no name typed. Fix: make the data-deleting act carry the typed name (a confirm field on the page's form, a confirm string on the API and tool) and have retirePinned refuse withData unless it equals the forge's name exactly. The terminal already does this. Update the canary, which sends confirm: name, and add a test that a retire-data POST with no name or the wrong one deletes nothing.

I found nothing else. The design rules hold: dl rows, the named btn ghost variant, forms that post with JavaScript off, no new accent.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs