Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLIPublic
AssigneesNone

Relationships

#5276 Promotion: swamp workspace promote, the first promote

Opened by zack · 12/1/2026

Problem

swamp workspace promote (swamp-club#5275) updates a workspace that exists on the server. The first promote has to create it, start it and carry on (design/surfaces/workspace-promotion.md, swamp-club#5250).

Change

After swamp-club#5275, and swamp-club#5273, without which a workspace on a host that sets an HTTP proxy never becomes ready.

Sign in, then look (workspace.get), create, resume, wait until ready within a deadline, exchange the host sign-in for a workspace token, diff and send. Each step asks the server first, so a workspace in the record is not created again and a running one is not resumed.

  • A name that exists and is in no record is refused as already_exists unless --existing is given. With --existing there is no last-sent digest, so a difference is a conflict.
  • A caller with write and no admin stops after create, with the command an admin runs. The same command carries on after that.
  • A workspace in failed stops the wait and shows its state.
  • A host on the user's own machine shares the registry, so promoting there under the workspace's own name is refused and asks for --name.

Settle in the doc, in the same PR

The record is written after workspace.create. A promote that dies between the two leaves a workspace that is in no record, so the next run is refused as already_exists, though "The first promote" says one that stops anywhere continues. Either write a pending record before the create, or say that this stop needs --existing.

Tests

  • Integration test against a serve host: a stop at each step, and what the next run does, including between the create and its record.
  • A caller without admin, a workspace that fails to start, a deadline that passes, a name that is taken, and a host on the same machine.

Done when

A promote stopped at each step finishes when run again, in the way the doc says, and a caller without admin stops after create with the command to run.

Where to look

  • design/surfaces/workspace-promotion.md: "The first promote", "The local record", "Authorization"
  • design/surfaces/serve-workspaces.md: "Sign in"
  • src/serve/handlers/workspace_handlers.ts, src/libswamp/hosted_workspace/, src/serve/host/
02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

12/1/2026, 2:16:40 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.