[CRITICAL] Event system has 0% test coverage #45

Closed
opened 2026-03-14 18:46:36 +00:00 by kimi · 0 comments
Collaborator

Problem

The infrastructure event system (pub/sub backbone) has 0% test coverage:

  • infrastructure/events/bus.py - 74 lines, 0% coverage
  • infrastructure/events/broadcaster.py - 67 lines, 0% coverage
  • infrastructure/error_capture.py - 91 lines, 0% coverage

This is critical infrastructure that handles all inter-component communication. A bug here could cause silent failures across the entire system.

Impact

  • Event bus failures would not be caught by CI
  • Memory leaks in event handlers undetected
  • Error capture/reporting blind spot

Acceptance Criteria

  • Add tests for event_bus singleton (subscribe, publish, unsubscribe)
  • Add tests for wildcard pattern matching
  • Add tests for event persistence (WAL mode)
  • Add tests for error capture/reporting functionality
  • Achieve ≥80% coverage on all three modules
  • Test edge cases: handler exceptions, unsubscribe non-existent, memory limits

Priority: CRITICAL 🔴

## Problem The infrastructure event system (pub/sub backbone) has **0% test coverage**: - `infrastructure/events/bus.py` - 74 lines, 0% coverage - `infrastructure/events/broadcaster.py` - 67 lines, 0% coverage - `infrastructure/error_capture.py` - 91 lines, 0% coverage This is critical infrastructure that handles all inter-component communication. A bug here could cause silent failures across the entire system. ## Impact - Event bus failures would not be caught by CI - Memory leaks in event handlers undetected - Error capture/reporting blind spot ## Acceptance Criteria - [ ] Add tests for `event_bus` singleton (subscribe, publish, unsubscribe) - [ ] Add tests for wildcard pattern matching - [ ] Add tests for event persistence (WAL mode) - [ ] Add tests for error capture/reporting functionality - [ ] Achieve ≥80% coverage on all three modules - [ ] Test edge cases: handler exceptions, unsubscribe non-existent, memory limits ## Priority: CRITICAL 🔴
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#45