Skip to content

feat: Smart Capture configurable trigger sub-settings and Connection Monitor integration#246

Merged
itsDNNS merged 9 commits intomainfrom
feat/245-smart-capture-sub-settings
Mar 16, 2026
Merged

feat: Smart Capture configurable trigger sub-settings and Connection Monitor integration#246
itsDNNS merged 9 commits intomainfrom
feat/245-smart-capture-sub-settings

Conversation

@itsDNNS
Copy link
Owner

@itsDNNS itsDNNS commented Mar 16, 2026

Summary

Adds per-trigger sub-settings for fine-grained control over when Smart Capture fires, and wires Connection Monitor packet loss events into the engine as a 5th trigger source.

Shared DOCSIS Utility

  • Extracted QAM_ORDER + qam_rank() from event_detector.py to app/docsis_utils.py
  • EventDetector now materializes prev_rank/current_rank in modulation change event details

Sub-Filter Architecture

  • Trigger dataclass extended with sub_filter: Callable field
  • 5 filter functions in app/smart_capture/sub_filters.py using qualifying-subset logic (any matching change triggers)
  • Engine applies sub-filter after config_key toggle check, before guardrails

Per-Trigger Sub-Settings

  • Modulation: Direction (DS/US/Both) + Min QAM level dropdown (Any/Below 256QAM/64QAM/16QAM)
  • SNR: No sub-settings in v1 (DS-only detection)
  • Error spike: Min error delta (0 = any spike)
  • Health: Level filter (Any degradation / Critical only)
  • Packet loss (new): Toggle + Min % threshold with coupling hint

Connection Monitor Wiring

  • set_smart_capture() method on CM Collector for post-construction injection
  • CM uses save_events_with_ids() for event ID annotation
  • Evaluates events through Smart Capture engine after save

Settings UI

  • Trigger cards with expandable sub-settings (show/hide on toggle)
  • Packet loss card with Connection Monitor coupling hint
  • CSS transitions for sub-settings visibility

i18n

  • 19 new keys across EN/DE/FR/ES with proper German umlauts

Closes #245

Test plan

  • 18 sub-filter unit tests (direction, QAM threshold, qualifying-subset, error delta, health level, packet loss)
  • 116 Smart Capture tests pass
  • 1701 total tests pass (0 failures)
  • i18n validation passes (39 language files in sync)

@itsDNNS itsDNNS merged commit 820d400 into main Mar 16, 2026
2 checks passed
@itsDNNS itsDNNS deleted the feat/245-smart-capture-sub-settings branch March 16, 2026 11:21
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.

Smart Capture: configurable trigger sub-settings and Connection Monitor integration

1 participant