Secondary SDR panel: never present an unreported SDR count or run state as fact
QA (drb-qa-review) blockers: sdr_count defaulted to 1 for nodes that never sent it, so the panel claimed 'reports 1 SDR (0 spare)'. It is now None until reported, and the count is only quoted alongside a real secondary_sdr_running report. Rows read 'Not reported' instead of 'Waiting for SDR' when the node hasn't said what's running (closes #187). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3cbb0828ae
commit
012cca402a
@@ -114,7 +114,7 @@ class MQTTHandler:
|
||||
"secondary_sdr_mode": payload.get("secondary_sdr_mode", "none"),
|
||||
"secondary_sdr_priority": payload.get("secondary_sdr_priority", []),
|
||||
"secondary_sdr_running": payload.get("secondary_sdr_running"),
|
||||
"sdr_count": payload.get("sdr_count", 1),
|
||||
"sdr_count": payload.get("sdr_count"), # None until reported, never a guessed 1
|
||||
"enforce_override_timeout": payload.get("enforce_override_timeout", True),
|
||||
"is_overridden": False,
|
||||
"override_system_id": None,
|
||||
|
||||
@@ -68,7 +68,7 @@ class NodeRecord(BaseModel):
|
||||
# checkin, which is the source of truth; set via PATCH /nodes/{id}.
|
||||
secondary_sdr_priority: List[str] = []
|
||||
secondary_sdr_running: Optional[List[str]] = None # what the node reports actually running
|
||||
sdr_count: int = 1 # self-reported by the node's checkin, best-effort
|
||||
sdr_count: Optional[int] = None # self-reported by the node's checkin; None = never reported
|
||||
enforce_override_timeout: bool = True
|
||||
is_overridden: bool = False
|
||||
override_system_id: Optional[str] = None
|
||||
|
||||
Reference in New Issue
Block a user