feat(mesh): config-driven regions with stale purge and coverage fix

- Extended RegionAnchor with local_name, description, aliases, cities
- Moved region geographic context from hardcoded Python to config.yaml
- Added 7-day stale node purge in _do_refresh (556 → 267 nodes)
- Fixed coverage lookup: str(node_num) → node_num (int key)
- Added bidirectional neighbor lookup for better region assignment
- Dynamic geography building in router from config
- Reporter reads region context from config instead of hardcoded dict

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
K7ZVX 2026-05-05 06:33:38 +00:00
commit de400068dd
6 changed files with 141 additions and 108 deletions

View file

@ -250,7 +250,8 @@ class MeshAI:
# Mesh reporter (for LLM prompt injection and commands)
if self.health_engine and self.data_store:
from .mesh_reporter import MeshReporter
self.mesh_reporter = MeshReporter(self.health_engine, self.data_store)
mi_regions = self.config.mesh_intelligence.regions if self.config.mesh_intelligence else []
self.mesh_reporter = MeshReporter(self.health_engine, self.data_store, region_configs=mi_regions)
logger.info("Mesh reporter enabled")
else:
self.mesh_reporter = None