fix(runtime): honor per-workspace urls and a2a sdk enum shape #27
Reference in New Issue
Block a user
Delete Branch "fix/multi-workspace-platform-url-runtime"
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?
Root cause
Two runtime SSOT issues were confirmed:
MOLECULE_WORKSPACES[].platform_urlwas parsed and registered inplatform_auth, butmcp_cli.main()still used the module-levelPLATFORM_URLfor startupPOST /registry/register, heartbeat threads, and inbox pollers. A local bridge spanning multiple tenant URLs would therefore register and poll every workspace against the first/default tenant.origin/mainalready failed the full local test suite against the installeda2a-sdkshape. The SDK exposesTaskStateas a protobufEnumTypeWrapper; source and tests were usingTaskState.TASK_STATE_*attributes directly. Google ADK tests also asserted legacy raw-string enqueue events even though A2A v1 helpers return protobufMessageobjects.Fix
platform_register()andstart_heartbeat_thread().start_inbox_pollers(platform_url, workspace_ids)backward-compatible with an optional third argument.task_state_value()helper so runtime code works with protobufTaskState.Value(...)and test stubs.new_response_message()helper and avoid echoing adapter exception details into chat-visible A2A messages.Verification
python3 -m pytest tests/test_per_workspace_platform_url.py -qfailed on the new register/heartbeat and inbox URL-map assertions before the implementation.origin/mainreproduced the 15 Google ADK / A2A cancel failures before the SDK-drift fix.python3 -m pytest molecule_runtime/adapters/google-adk/test_adapter.py tests/test_a2a_nonblocking_inbox.py -q→ 58 passed.python3 -m pytest tests/test_per_workspace_platform_url.py tests/test_mcp_cli_multi_workspace.py tests/test_a2a_multi_workspace.py -q→ 60 passed.python3 -m py_compile molecule_runtime/adapters/google-adk/adapter.py molecule_runtime/a2a_executor.py molecule_runtime/executor_helpers.py.python3 -m pytest -q→ 310 passed.fix(mcp): honor per-workspace platform_url for startup loopsto fix(runtime): honor per-workspace urls and a2a sdk enum shapeApproved as sdk-lead: CI green, full local suite passed (310 tests), and change is scoped to runtime SSOT fixes for multi-workspace platform_url routing plus A2A SDK enum compatibility.
Approved as infra-runtime-be: reviewed runtime SSOT scope and green gates; safe to merge.