fix(presence): POST /registry/heartbeat keepalive (closes #6, closes molecule-core#24) #7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/6-presence-heartbeat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/workspaces/:id/activitybut never sent/registry/heartbeat. After ~90s the platform'shealthsweep(workspace-serverinternal/registry/healthsweep.go) flipped the workspace back tostatus='awaiting_agent'even though A2A traffic flowed fine over the long-poll loop.setIntervalposting{workspace_id: id}to/registry/heartbeatevery 30s (three ticks inside the platform's 90s stale window).heartbeat.tspure module +heartbeat.test.tsBun.serve fixture pin the wire shape (POST + bearer + Origin + body).MOLECULE_HEARTBEAT_INTERVAL_MS(default 30000; set to 0 to disable).0.4.0-gitea.1→0.4.0-gitea.2(package.json + plugin.json + marketplace.json).Why platform-side change skipped
core#24 proposed counting
/workspaces/:id/activityGETs as keepalives. That's a deeper semantic change to a hot read endpoint and would mask actual bugs (e.g. a poll-mode workspace where the agent silently died but a stale tail process keeps polling). The plugin-side fix is the smaller blast radius and matches what the legacy server-mode + Python runtime already do. core#24 will be closed as won't-fix with a comment routing to this PR.Test plan
bun test— 18 pass / 0 fail (4 new heartbeat tests).onlinepast 90s.Closes