Implement 5-pillar health scoring with coverage

- Update HealthScore with coverage pillar (20% weight)
- Adjust weights: Infra 30%, Util 25%, Coverage 20%, Behavior 15%, Power 10%
- Add coverage metrics: avg_gateways, single_gw_count, full_count
- Add health score fields to UnifiedNode for direct sync
- compute() now syncs scores back to UnifiedNode objects
- Coverage scoring penalizes single-gateway nodes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
K7ZVX 2026-05-05 04:59:41 +00:00
commit a384fd7a20
2 changed files with 946 additions and 868 deletions

File diff suppressed because it is too large Load diff

View file

@ -127,6 +127,15 @@ class UnifiedNode:
public_key: str = ""
is_mqtt_gateway: bool = False
via_mqtt: bool = False
# Health scoring (set by MeshHealthEngine)
is_infrastructure: bool = False
health_score: float = 100.0
infra_score: float = 100.0
util_score: float = 100.0
coverage_score_node: float = 100.0
behavior_score: float = 100.0
power_score: float = 100.0
@dataclass