Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublic
Assigneeszack

Relationships

↔ sibling #4951

#4970 Remove the serve host's host folder layout and --host-dir: the host always reads host.yaml from the config dir and serves the registry's workspaces

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

Follow-up to swamp-club#4920 and swamp-club#4921.

Problem

swamp serve host runs in one of two layouts: a host folder (host.yaml beside a workspaces/ folder holding the state files and one repo per workspace, chosen with --host-dir or by running in that folder) and no host folder (<config dir>/host.yaml, state in <data dir>/host/). Since swamp-club#4919 and swamp-club#4865 the workspace registry decides what the host serves, not the folder, so the host folder layout no longer earns its cost:

  • two layouts, chosen by --host-dir, then the current folder, then the config dir;
  • two rules for whose a workspace is: the folder's place with a host folder, the wanted file's creator and folder without one;
  • two places a workspace request creates a repo;
  • the hidden --host-no-folder flag the host passes its root;
  • a workspaces/ scan that registers folders the registry lacks, and the clashes that scan can produce (swamp-club#4951).

--host-dir also does not give an operator separate hosts: two host folders still share one registry, so each lists the other's workspaces.

Change

Remove the host folder layout entirely. swamp serve host always reads <config dir>/host.yaml and keeps its state in <data dir>/host/; its workspaces are the registry's entries, and a request creates a workspace where swamp workspace create would.

  • Remove --host-dir and the current-folder lookup in locateHostYaml.
  • Remove HostLayout.hostFolder, hostFolderLayout and WORKSPACES_DIR.
  • Remove the workspaces/ scan and registration, and hostFolderClaimedBy.
  • Make the creator-and-folder wanted-file rule the only ownership rule.
  • Remove the hidden --host-no-folder serve flag; the root always behaves as it does with it today.
  • Relative paths in host.yaml resolve from the config dir.
  • Update the command help, design/surfaces/serve-workspaces.md (The host, Compatibility, the execution plan) and the tests.

Compatibility

None needed: the command is hidden. An existing host folder stops working. Its operator moves host.yaml to the config dir and imports each repo with swamp workspace import; the host's error with no host.yaml in the config dir should say where to put one.

  • swamp-club#4951: its clashes come from repos in a host's workspaces/ that the registry does not know yet. With no host folder there are none, so it should be closed with this change.
  • swamp-club#4967: its out-of-scope note about host folders goes away; its fix becomes the only ownership rule.

Where to look

  • src/serve/host/host_layout.ts (locateHostYaml, hostFolderLayout)
  • src/cli/commands/serve_host.ts (--host-dir, help text)
  • src/serve/host/workspace_roster.ts, src/libswamp/workspace/hosted_roster.ts (hostFolderClaimedBy, the hostFolder branches)
  • src/libswamp/hosted_workspace/create.ts, src/libswamp/hosted_workspace/deps.ts
  • src/serve/host/serve_process.ts, src/serve/host_root_workspaces.ts, src/cli/commands/serve.ts (--host-no-folder)
  • src/serve/host/host_config.ts (state folder and root containment checks)
  • design/surfaces/serve-workspaces.md
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 22 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

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

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/20/2026, 9:40:11 PM
zack linked sibling of #495111/20/2026, 9:47:16 PM

Sign in to post a ripple.