Harden mesh dispatch against silent failures
Three structural improvements to prevent future silent drops:

1. Add else-warning in on_message() dispatch chain — any unhandled proto
   message kind now logs a WARNING in production instead of being silently
   swallowed. This would have made the work_pool_update miss immediately visible.

2. Fix on_ready to use getattr(message, kind) — same safe extraction pattern
   now applied consistently to all dispatch branches. Prevents Bug 1 class
   from recurring if _on_mesh_ready ever starts using the argument.

3. Remove redundant _health_thread_started boolean from send_health() guard —
   _start_health_stream() already gates on thread.is_alive(), so the outer
   boolean was a stale fast-path that could mislead future readers back into
   the original thread-restart bug.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9c189a5 commit 5a8bfa04cdebe967da9361e8c1cbd309b27f8183
@axieyangb axieyangb authored 12 days ago
Showing 2 changed files
View
mesh-sdk/mesh_core/engines/node.py
View
mesh-sdk/mesh_core/transport/grpc.py