Skip to content

feat: modem restart detection via error counter reset (#60)#253

Merged
itsDNNS merged 6 commits intomainfrom
feat/60-modem-restart-detection
Mar 17, 2026
Merged

feat: modem restart detection via error counter reset (#60)#253
itsDNNS merged 6 commits intomainfrom
feat/60-modem-restart-detection

Conversation

@itsDNNS
Copy link
Owner

@itsDNNS itsDNNS commented Mar 17, 2026

Summary

Detects modem restarts by observing per-channel DOCSIS error counter resets between consecutive polling cycles. Emits modem_restart_detected event to Event Log.

  • _check_restart() in EventDetector, before _check_errors()
  • Per-channel DS counter comparison (>=80% declining threshold)
  • Continuity guard against channel map changes (>=50% overlap, min 4 channels)
  • Summary total sanity check
  • Relaxed declining definition: at least one counter type declined, neither increased

Test plan

  • 13 unit tests covering detection, thresholds, edge cases
  • Full test suite passes
  • i18n validation passes
  • No false positives on normal operation (counters increasing)
  • No false positives on channel map changes
  • Correctly handles (N, 0) -> (0, 0) scenario
  • Does not trigger error_spike on restart

itsDNNS added 6 commits March 17, 2026 15:06
- Per-channel: evaluate each counter family independently instead of
  skipping the entire channel when one counter is None. (corr=None,
  uncorr=5) -> (None, 0) now correctly detected as declining.
- Summary sanity check: only enforce when all four total values are
  present. Missing keys no longer default to 0 (which caused false
  positives on incomplete analyzer output).
- Added 3 new tests for partial None and missing summary scenarios.
@itsDNNS itsDNNS merged commit fd4e0e1 into main Mar 17, 2026
2 checks passed
@itsDNNS itsDNNS deleted the feat/60-modem-restart-detection branch March 17, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant