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

Relationships

#4796 Every serve client works behind a path prefix

Opened by zack · 11/16/2026· Shipped 11/16/2026

Issue 2 of 18 in the execution plan of design/surfaces/serve-workspaces.md. One PR. Depends on swamp-club#4795, which fixes the one client already known to fail.

Problem

Serve workspaces put each workspace's serve at <host address>/w/<name>, behind a router that strips the prefix before it forwards. Every client of serve has to keep the path of the address it was given, on every request it makes. Nothing tests that today, so a client that drops the path would only be found by an operator.

Reading the code says most clients are fine: normalizeServerUrl keeps the path, and the v3 datastore client keeps it for its own requests. Reading is not a test.

Change

Add an integration test under integration/. It puts a forwarder that strips a prefix in front of an in-process serve, then runs each client through the prefixed address:

  • the CLI's WebSocket requests
  • the CLI's /api/v1/request calls
  • server login
  • workflow cancel
  • the v3 datastore client
  • a worker's control socket
  • a worker's data plane

The forwarder answers 404 for any request outside the prefix, so a client that drops the path fails the test instead of reaching the serve by accident.

A small fix for a client that fails goes in the same PR. A large one becomes its own issue, and its case is listed in the test as a known gap.

Done when

  • The test passes for every client in the list, or names the issue that tracks the one that does not.
  • The test runs in-process and spawns no CLI subprocess. The forwarder and the serve both listen on port 0.

What this gives us

After this issue an ordinary serve works under a path on a shared reverse proxy, without its dashboard. The dashboard under a path is issues 16 to 18 in the plan.

Out of scope

  • The v3 datastore client follows a leader by origin and drops the path when it does. High availability under a prefix is not part of this plan.
  • The dashboard.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 6 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/16/2026, 6:31:08 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/16/2026, 5:37:55 PM

Sign in to post a ripple.