Relationships
#4587 serve: send instanceId in the swamp.club heartbeat body
Opened by skunk-ape · 11/10/2026· Shipped 11/10/2026
Problem
swamp serve sends its instanceId to swamp.club once, on PUT /api/v1/serve/instances at boot. sendInstanceHeartbeat (src/serve/oauth_client.ts) sends no body — only the oauthClientId in the URL.
Serves sharing a datastore share one OAuth client (its credentials live in the control-plane store), so swamp.club cannot tell which process a heartbeat came from: their rows collapse into one, and the collective Serve tab shows a single healthy instance even if only one process is alive.
Proposed change
Send {"instanceId": "<id>"} as a JSON body (with content-type: application/json) on the heartbeat PUT.
Today's swamp.club never reads the heartbeat body, so this is safe to release first. swamp-club#4202 moves to one row per process, matching heartbeats on oauthClientId + instanceId and falling back to oauthClientId when the body is absent.
Related
Heartbeats never re-register: a 404 logs a warning on every beat, and a serve whose row is missing stays invisible until restart. Consider re-registering on a 404 in the same change.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.