Skip to content

Per-ship switch between 32-bit and 64-bit vere - #769

Open
mopfel-winrux wants to merge 1 commit into
masterfrom
mw/vere64_optin
Open

mopfel-winrux wants to merge 1 commit into
masterfrom
mw/vere64_optin

Conversation

@mopfel-winrux

Copy link
Copy Markdown
Contributor

What

Lets a hosted ship opt into the 64-bit vere runtime, and back, from the ship page. Pairs with Native-Planet/urbit-docker vere64-optin, which makes the canary image ship both vere32 and vere64 of the same release under /usr/local/vere/{32,64}/urbit (/bin/urbit stays 32-bit, so nothing changes for existing ships and the version server is untouched).

Why

vere 5.0 (edge) migrates a pier's snapshot between loom widths automatically at boot: the 64-bit binary upgrades a 32-bit snapshot in place, and the 32-bit binary downgrades a 64-bit one if it fits in the 32-bit loom (16 GB cap). Since both binaries live in one image, the switch is "stop cleanly, boot once with the other binary" and needs no image pull.

How

  • New per-pier vere_bits setting (defaults to 32). Every start script (boot, prep, pack, meld, chop, rollchop, roll) takes --vere-bits=32|64 and prepends the matching dir to PATH, so vere updates, prep, and chop keep working on either width.
  • New migrate boot status: the script reads the snapshot's real width from image.bin, replays to head with the current-width binary (a cross-width migration aborts on a stale snapshot), then boots once with the target binary.
  • New vere-bits websocket action, modelled on Chop: |exit the ship, run the migrate container, check its exit code (revert vere_bits and restart on the old width if it fails), then restart only if the ship was running.
  • UI: "Vere Runtime" section under Loom with a 32/64 selector, confirmation modal with the relevant warnings, progress states, and a 64-BIT header badge.
  • Blocks --vere-bits and --no-migrate in the extra-args box.

Also fixes two pre-existing issues found on the way: the prep script has had dofa instead of do since v2.4.10 (bash syntax error, so urbit prep never ran during vere updates), and the Value field on the websocket payload had a malformed json tag that failed go vet.

Tested

  • go build, go vet, unit tests for docker/structs/config/defaults; UI builds; all embedded scripts pass bash -n.
  • Fake ~zod inside the new image: 32→64 migration, normal 64-bit boot via the real start script, unclean kill, then 64→32 migration (the replay-first step handled the stale snapshot).

Notes

  • Only the edge pace publishes vere32/vere64 artifacts, so this is canary-only until Tlon promotes 5.0.
  • 64-bit nouns take roughly twice the memory; the modal tells users they may need to raise the loom.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KkS5szoJcM6ExZh9jAQTXP

The canary urbit image now ships both vere32 and vere64 of the same
release. This lets a hosted ship opt into the 64-bit runtime (and back)
without pulling a different image:

- new per-pier `vere_bits` setting (defaults to 32); every start script
  takes `--vere-bits=32|64` and prepends /usr/local/vere/<bits> to PATH
- new `migrate` boot status: replays to head with the current-width
  binary, then boots once with the target binary so vere migrates the
  snapshot in place
- `vere-bits` websocket action that stops the ship cleanly, runs the
  migration, checks the exit code (reverting on failure), and restarts
  the ship if it was running
- UI: "Vere Runtime" section with a 32/64 selector and confirmation
  modal, 64-BIT badge in the ship header
- fix `dofa` typo that made the prep script a bash syntax error, and a
  malformed json tag on the websocket payload Value field

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkS5szoJcM6ExZh9jAQTXP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant