|
Self-recovery: dispatch dict, disable updater in Docker, fix watchdog semantics
1. Replace if/elif dispatch chain with _DISPATCH dict (engines/node.py) Adding a proto message kind now requires exactly one entry in _DISPATCH — impossible to add a callback slot without the routing case. Missing kinds emit WARNING immediately. Extractor is colocated with the route so the wrong-object bug (Bug 1) cannot recur. 2. Honour CORTEX_DISABLE_AUTO_UPDATE env var (updater.py) In Docker, updates are delivered via image rebuilds. The old behaviour called sys.exit(0) to spawn a bootstrapper, which Docker restart:always turned into an infinite boot loop. Setting CORTEX_DISABLE_AUTO_UPDATE=1 in the container env prevents this entirely. 3. Watchdog ticks unconditionally in health reporter (node.py) Previously the watchdog tick was skipped when the hub was unreachable, causing os._exit(1) after 300s of any disconnect — even during normal gRPC reconnect backoff. Now the watchdog proves the reporter thread is alive regardless of hub state; it only fires if the thread itself deadlocks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
|---|
|
|
| agent-node/src/agent_node/core/updater.py |
|---|
| agent-node/src/agent_node/node.py |
|---|
| mesh-sdk/mesh_core/engines/node.py |
|---|