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

Relationships

↔ sibling #4970

#4951 swamp workspace import silently takes a serve host's workspace offline when its folder or name is in the host's workspaces folder

Opened by zack · 11/20/2026· Shipped 11/21/2026

Problem

swamp workspace import <folder> --name <name> registers a repo folder under any free name with no warning, even when that folder or name belongs to a serve host's workspaces/ folder. Since swamp-club#4865 a serve host lists every registry entry, and a registry entry wins over a folder in workspaces/, so such an import silently takes a team's workspace offline.

Import already refuses both clashes once the host has registered its folders: a folder already registered is returned under its existing name (--name is ignored), and a taken name is refused with name_taken. The gap is a folder in workspaces/ that is not in the registry yet: the host is stopped or has not rescanned, the host folder predates swamp-club#4918, the host runs under another SWAMP_HOME, or the folder's entry was just removed with swamp workspace remove.

Two cases

  1. swamp workspace import <host>/workspaces/gamma --name beta. The entry beta holds the folder, so the host no longer serves it as gamma: /w/gamma stops answering for its clients, and beta is listed as the operator's own, stopped. gamma remains only as a name with a wanted file.
  2. swamp workspace import /ext/alpha --name alpha while <host>/workspaces/alpha exists unregistered. The name clashes, and the host starts neither repo until someone frees the name.

Neither loses data since swamp-club#4865 (delete is refused, a deleted wanted file the host cannot act on is dropped, and removal re-checks the folder last), but the workspace goes offline, and the only signal is an error in the host's log, which the person running import does not see.

Expected

Import warns, or refuses unless forced, when:

  • the folder is workspaces/<x> inside a serve host folder and the chosen name is not x; or
  • the chosen name is also a folder in a known serve host's workspaces/.

Open question

Import has no way to know where hosts are today. Options: detect a host folder by layout (a host.yaml beside the workspaces/ that holds the folder), or have the host record its state where workspace commands can read it, which ties in with swamp-club#4920 and swamp-club#4921 (a host with no host folder). Decide alongside those.

Where to look

  • src/libswamp/workspace/workspace_store.ts (importWorkspace)
  • design/surfaces/serve-workspaces.md, Names and folders
  • design/surfaces/workspace.md
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 7 MOREPR_LINKED+ 1 MORESESSION_SUMMARIZED

Shipped

11/21/2026, 12:13:46 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack linked sibling of #497011/20/2026, 9:47:16 PM
Editable. Press Enter to edit.

zack commented 11/20/2026, 9:39:20 PM

swamp-club#4970 removes the serve host's host folder layout, and with it the workspaces/ folder whose unregistered repos these clashes come from. If it lands, this issue should be closed with it.

Sign in to post a ripple.