mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-05-21 23:24:44 +02:00
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:
parent
ac2bb87473
commit
a384fd7a20
2 changed files with 946 additions and 868 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -127,6 +127,15 @@ class UnifiedNode:
|
||||||
public_key: str = ""
|
public_key: str = ""
|
||||||
is_mqtt_gateway: bool = False
|
is_mqtt_gateway: bool = False
|
||||||
via_mqtt: 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
|
@dataclass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue