Public: anyone can read this; the crew can change it.
Upgrade a shared forge to a dedicated one, keeping its data #17167
Check · Review · Land · Live — Its check is red.
An admin can now upgrade a shared forge to a dedicated plan, and its data moves with it. bun x tsc --noEmit is clean. The new test/upgrade-shared.test.ts, the MCP, page and terminal move-door tests, and the route-mark, hollow-code and unused-export checks pass.
-
Reviews
No review yet.
-
Checks
stopped failed before it answered — 24332 passed, 14 failed: a pull from another forge is a guest until a writer approves it > a waiting guest's preview starts with no variables and no forge token; after approval it has both, 360 px: the controls are one 44 px row in the lower half beside the composer, and the head is the title alone, a fresh connection's tools/list is under 6000 bytes and names find_tool, and 11 more deploy 641e73f queued for scout
Check failed: a pull from another forge is a guest until a writer approves it > a waiting gue…Check of 641e73fchecked against main at cec8b4dfast tier: red in 11m56s
Website spec: 25 findings (report only)
- /board http://127.0.0.1:37585/board answered 303 — https://specification.website/
- /cockpit http://127.0.0.1:37585/cockpit answered 303 — https://specification.website/
- /notes http://127.0.0.1:37585/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:37585/review answered 303 — https://specification.website/
- /system http://127.0.0.1:37585/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:37585/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:37585/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:37585/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:37585/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:37585/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:37585/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:37585/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:37585/settings/crew?help answered 303 — https://specification.website/
- /settings/captain http://127.0.0.1:37585/settings/captain answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:37585/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:37585/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:37585/preview-admin/sample/drop answered 303 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:37585/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:37585/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
- /looks/missing http://127.0.0.1:37585/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:37585/looks/failed answered 500 — https://specification.website/
An admin can now upgrade a shared forge to a dedicated plan, and its data moves with it. bun x tsc --noEmit is clean. The new test/upgrade-shared.test.ts, the MCP, page and terminal move-door tests, and the route-mark, hollow-code and unused-export checks pass. I didn't run the full suite, and I didn't write the keep_plan or estimate entries.
What changed
- The action.
src/actions/upgrade_shared.tshasplanUpgrade, which only previews, andupgradeShared, which does the move and then the plan change. The preview shows the machine, the move steps, and the price before and after (shared → small: $19.00 / month). The move ismoveToMachinefromsrc/spawn/move_machine.ts: copy through the backup destination, start, switch the router. The plan changes only once the forge answers on the machine. A failed move leaves it shared and billed as shared. - Billing. On success it writes the entitlement (kept in
entitlement_change, sourceupgrade), tells the forge its new plan, and emits abilling.planevent. The earlier price falls back to the shared density price when a stored plans list lacks the shared plan. - Web. An "Upgrade to a dedicated forge" button on
/forges, shown only for shared forges in their own cell when a machine is declared. It opens/forges/<name>/upgrade, where?plan=&to=previews and the POST does it, with a route mark and the lazy list updated. - Terminal. Key
eon the Forges screen asks which forge, plan and machine, shows the same plan, then confirms. - MCP. The
forgestool takesaction: "upgrade"withforge,planandto. It previews by default anddryRun: falsedoes it. - Docs. The "Not done" line in
docs/features/shared-tier.mdis now an "Upgrading" section. - Reused. I reused
planMove,moveToMachine,previewChange,changeLine,centsFor,putEntitlementandtellPlanrather than writing new ones.
Left out
- A forge whose subscription is at a payment provider is refused with words saying to change it there. This forge can't change what Stripe bills, and I didn't want to move the price here behind its back.
- Only an admin who is a person can do it, and agents are refused. An owner upgrading their own forge is not built.
- It needs a declared machine (
FORGE_MACHINES) and a forge in its own cell. A forge hosted inside this process is told to sandbox first.
Gate notes
- The both-doors rule would not accept the terminal key and the how-to edit as doors for a new page, so the commit says
No door:with the reason. ANo look:line says why there is no look page: the look fixture has no declared machine. - The gate's "one implementation?" similarity notes remain on
upgradeOne,forgeUpgradeForm,forgeUpgradeSubmitand a test helper. Each follows the shape of its machine-move sibling, and I left them.
Try it
Declare a machine, put a forge on the shared plan, then open /forges/<name>/upgrade on the preview. You can also call MCP forges with { action: "upgrade", forge, plan: "small", to: "<machine>" }.
🤖 Generated with Claude Code
An admin can now upgrade a shared forge to a dedicated plan, and its data moves with it.
bun x tsc --noEmitis clean. The newtest/upgrade-shared.test.ts, the MCP, page and terminal move-door tests, and the route-mark, hollow-code and unused-export checks pass. I didn't run the full suite, and I didn't write thekeep_planorestimateentries.What changed
src/actions/upgrade_shared.tshasplanUpgrade, which only previews, andupgradeShared, which does the move and then the plan change. The preview shows the machine, the move steps, and the price before and after (shared → small: $19.00 / month). The move ismoveToMachinefromsrc/spawn/move_machine.ts: copy through the backup destination, start, switch the router. The plan changes only once the forge answers on the machine. A failed move leaves it shared and billed as shared.entitlement_change, sourceupgrade), tells the forge its new plan, and emits abilling.planevent. The earlier price falls back to the shared density price when a stored plans list lacks the shared plan./forges, shown only for shared forges in their own cell when a machine is declared. It opens/forges/<name>/upgrade, where?plan=&to=previews and the POST does it, with a route mark and the lazy list updated.eon the Forges screen asks which forge, plan and machine, shows the same plan, then confirms.forgestool takesaction: "upgrade"withforge,planandto. It previews by default anddryRun: falsedoes it.docs/features/shared-tier.mdis now an "Upgrading" section.planMove,moveToMachine,previewChange,changeLine,centsFor,putEntitlementandtellPlanrather than writing new ones.Left out
FORGE_MACHINES) and a forge in its own cell. A forge hosted inside this process is told to sandbox first.Gate notes
No door:with the reason. ANo look:line says why there is no look page: the look fixture has no declared machine.upgradeOne,forgeUpgradeForm,forgeUpgradeSubmitand a test helper. Each follows the shape of its machine-move sibling, and I left them.Try it Declare a machine, put a forge on the shared plan, then open
/forges/<name>/upgradeon the preview. You can also call MCPforgeswith{ action: "upgrade", forge, plan: "small", to: "<machine>" }.🤖 Generated with Claude Code
Closes #17024