mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-07-23 05:40:59 +00:00
Adds 4 failing tests asserting the #1749 acceptance criteria: - EscalateOnPersistentDisconnect_1749: source stuck in LivenessDisconnected past disconnectedReconnectMultiplier×threshold MUST trigger a forced reconnect at least once. On master, processLivenessTransition silently returns on LivenessDisconnected. - DisconnectedEscalationThrottled_1749: repeat escalations within forceReconnectThrottle MUST be suppressed (no broker hammering). - LoopRecoversFromPanicInEmit_1749: a panic inside the emit callback MUST NOT kill the watchdog goroutine. On master there is no defer/recover around the per-source processLivenessTransition call. - LastTickUnixExposed_1749: WatchdogLastTickUnix() MUST advance with every tick so external monitoring can detect a wedged watchdog. Adds two stubs in mqtt_watchdog.go so the test file compiles AND fails on assertion (not build error): - DisconnectedSinceUnix int64 on SourceLivenessState - watchdogLastTickUnix atomic.Int64 + WatchdogLastTickUnix() getter These stubs are unwired (production loop does not write them yet) so all 4 tests fail on the expected assertion path. Green commit will wire them, add the escalation logic, and surface the clock in /api/mqtt/status.