Fix node disconnect: health stream restart, policy dispatch, work_pool routing
Three bugs causing nodes to drop offline and stay offline after disconnect:

1. on_policy passed full ServerMessage instead of sub-message — caused
   Dispatch Error: mode on every connection (AgentNode._on_policy_update
   accesses policy.mode directly)

2. _health_thread_started never reset in close() — health stream could not
   restart after reconnect, so hub watchdog eventually timed out the node

3. work_pool_update had no dispatch case in on_message() — _handle_work_pool
   was dead code, causing hub to flood nodes with unclaimed task updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 81173f4 commit 9c189a57feb3a58c869a5fb94a210a95cfa01c91
@axieyangb axieyangb authored 12 days ago
Showing 3 changed files
View
agent-node/src/agent_node/node.py
View
mesh-sdk/mesh_core/engines/node.py
View
mesh-sdk/mesh_core/transport/grpc.py