spaxel/mothership/internal/events
jedarden 823b67c630 feat(events): implement activity timeline with two-phase shutdown and test fixes
- StorageSubscriber: refactor to two-phase shutdown (forwarders drain
  EventBus channels into queue, then worker drains queue to SQLite)
  ensuring no in-flight events are lost on Stop()
- Fix bus_test: increase channel capacity to avoid non-blocking drops
  in TestEventBusConcurrentPublish
- Fix events_test: set MaxOpenConns(1) for in-memory SQLite to prevent
  concurrent-connection data visibility issues
- Fix storage_test: remove manual ctx/cancel initialization after
  StorageSubscriber struct was refactored to separate workerCtx/forwarderCtx
- Fix api/events.go: zone_id and person_id always take precedence;
  until timestamp uses < (cutoffMs+1000) to include full RFC3339 second
- Fix api/events_test: default mode is expert, simple mode requires
  explicit ?mode=simple parameter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 19:08:02 -04:00
..
bus.go feat: implement internal typed event bus with pub-sub 2026-04-09 14:05:32 -04:00
bus_test.go feat(events): implement activity timeline with two-phase shutdown and test fixes 2026-04-13 19:08:02 -04:00
events.go feat: complete anomaly detection & security mode dashboard UI 2026-04-07 15:50:25 -04:00
events_test.go feat(events): implement activity timeline with two-phase shutdown and test fixes 2026-04-13 19:08:02 -04:00
storage.go feat(events): implement activity timeline with two-phase shutdown and test fixes 2026-04-13 19:08:02 -04:00
storage_test.go feat(events): implement activity timeline with two-phase shutdown and test fixes 2026-04-13 19:08:02 -04:00
types.go feat: add nightly archive scheduler for events (02:00 local time) 2026-04-07 12:40:25 -04:00