molecule-core/workspace-server/internal
Hongming Wang f001a4cf5e
fix(registry): heartbeat transitions provisioning→online on first heartbeat (#1784) (#1794)
Workspaces restart with status='provisioning' and never transition to
'online' because the runtime never calls /registry/register after
container start — only the heartbeat loop runs post-boot. The heartbeat
handler had transitions for online→degraded, degraded→online, and
offline→online, but NOT provisioning→online, leaving newly-started
workspaces in a phantom-idle state where the scheduler defers dispatch
and the A2A proxy rejects them even though they're running fine.

Fix: add provisioning→online transition to evaluateStatus(), guarded by
`AND status = 'provisioning'` in the UPDATE WHERE clause so a concurrent
Delete cannot flip 'removed' back to 'online'. Broadcasts WORKSPACE_ONLINE
with recovered_from='provisioning' so dashboard/scheduler reflect reality.

Add TestHeartbeatHandler_ProvisioningToOnline to cover the new path.

Issue: Molecule-AI/molecule-core#1784

Co-authored-by: Molecule AI Core-BE <core-be@agents.moleculesai.app>
Co-authored-by: molecule-ai[bot] <276602405+molecule-ai[bot]@users.noreply.github.com>
2026-04-23 18:34:10 +00:00
..
artifacts test(handlers): add CWE-22 regression suite + KI-005 terminal access fix + tests (#1574) 2026-04-22 15:30:11 +00:00
bundle fix(platform): unblock SaaS workspace registration end-to-end 2026-04-21 03:06:46 -07:00
channels test(handlers): add CWE-22 regression suite + KI-005 terminal access fix + tests (#1574) 2026-04-22 15:30:11 +00:00
crypto chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00
db test: schema_migrations tracking — 4 cases (first boot, re-boot, mixed, down.sql filter) 2026-04-18 11:52:27 -07:00
envx chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00
events chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00
handlers fix(registry): heartbeat transitions provisioning→online on first heartbeat (#1784) (#1794) 2026-04-23 18:34:10 +00:00
metrics chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00
middleware fix(canvas/a11y): aria-hidden SVGs, MissingKeysModal semantics, session cookie auth (#1744) 2026-04-23 17:39:38 +00:00
models fix: CWE-78 rm scope, go vet failures, delegation idempotency 2026-04-21 18:22:30 +00:00
orgtoken fix(platform-go-ci): align test mocks with schema drift + org_id context contract (#1755) 2026-04-23 07:14:33 +00:00
plugins chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00
provisioner fix(cp-provisioner): look up real EC2 instance_id for Stop + IsRunning (#1738) 2026-04-23 18:25:29 +00:00
registry fix(sweeper): emit WORKSPACE_PROVISION_FAILED so canvas updates UI 2026-04-20 20:38:41 -07:00
router fix(review): address code review blockers on tool-trace + instructions 2026-04-22 16:18:06 -07:00
scheduler feat(scheduler): sweepPhantomBusy — clear stuck active_tasks from crashed runs (extracted from #1664) 2026-04-22 19:57:49 -07:00
supervised chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00
ws chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00
wsauth chore: open-source restructure — rename dirs, remove internal files, scrub secrets 2026-04-18 00:24:44 -07:00