molecule-ai-workspace-runtime/tests
molecule-ai[bot] dcb6edd1a1
fix(shared_runtime): push heartbeat on CLEAR in set_current_task() (#37)
Fixes #1372 — phantom busy: canvas showed workspace as active for up
to 30s after task completion because set_current_task("") returned
early without posting the updated heartbeat.

Before: clearing only updated the heartbeat object; the next 30s
scheduled heartbeat cycle propagated the clear. Quick tasks would leave
a phantom-busy indicator.

After: both SET and CLEAR push immediately to /registry/heartbeat.
active_tasks=0 on clear, active_tasks=1 on set. Heartbeat object
update and HTTP post are now unconditional.

Tests: 5 new cases covering SET/CLEAR HTTP body, error resilience,
None heartbeat, and missing env vars.

Co-authored-by: Molecule AI Infra-Runtime-BE <infra-runtime-be@agents.moleculesai.app>
2026-04-22 17:33:42 +00:00
..
conftest.py test: move sdk stubs to conftest.py (consistent across all test modules) 2026-04-16 11:15:45 -07:00
test_a2a_mcp_server.py fix(builtin_tools/audit): fail-secure RBAC — read-only default when config unavailable 2026-04-20 22:47:38 +00:00
test_adapter_loader.py fix(adapter-loader): fall back to any BaseAdapter subclass 2026-04-20 16:59:12 -07:00
test_audit.py fix(builtin_tools/audit): fail-secure RBAC — read-only default when config unavailable 2026-04-20 22:47:38 +00:00
test_imports.py fix: switch top-level from adapters import to absolute imports (#1) 2026-04-16 07:53:03 -07:00
test_plugins_builtins_env_scrub.py fix(plugins_registry/builtins): strip API keys from plugin setup.sh env 2026-04-20 22:52:13 +00:00
test_session_resume_gate.py test: move sdk stubs to conftest.py (consistent across all test modules) 2026-04-16 11:15:45 -07:00
test_shared_runtime.py fix(shared_runtime): push heartbeat on CLEAR in set_current_task() (#37) 2026-04-22 17:33:42 +00:00
test_validation.py test+fix(builtin_tools/validation): add test coverage + fix ".." bypass in regex 2026-04-21 00:55:08 +00:00
test_workspace_id_validation.py fix(a2a_cli): validate WORKSPACE_ID in discover() before X-Workspace-ID header 2026-04-21 01:35:37 +00:00