spaxel/mothership/internal/api
jedarden fc6cc839ee
Some checks are pending
CI Benchmark - Fusion Loop Timing / Fusion Loop Timing Benchmark (push) Waiting to run
feat(triggers): add predicted_enter trigger type for pre-emptive automation
Add support for 'predicted_enter' trigger condition that fires when a
prediction indicates a person is likely to enter a zone within a configured
time window (default 30 minutes). Uses rising-edge detection with 60-minute
cooldown per person-zone combination.

Changes:
- Add migration_017 to expand triggers table CHECK constraint to include
  'predicted_enter' (SQLite table recreation required)
- Update volume store init() for new databases with expanded constraint
- Add predicted_enter to API validation in volume_triggers.go
- Implement evaluatePredictedEnter() in volume store with rising-edge
  detection and cooldown tracking
- Add PredictionProvider interface and SetPredictionProvider() methods
  to both volume.Store and automation.Engine
- Wire predicted_enter evaluation into 10 Hz fusion tick pipeline

Closes: bf-20sp3

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 10:35:24 -04:00
..
alerts.go feat: complete crowd flow visualization implementation 2026-04-11 07:27:21 -04:00
analytics.go feat: complete anomaly detection & security mode dashboard UI 2026-04-09 05:59:54 -04:00
analytics_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
backup.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
backup_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
baseline.go api: add GET /api/baseline and POST /api/baseline/capture endpoints 2026-05-05 13:50:31 -04:00
baseline_test.go api: add GET /api/baseline and POST /api/baseline/capture endpoints 2026-05-05 13:50:31 -04:00
ble_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
briefing.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
briefing_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
diurnal.go fix: resolve all test and vet failures across mothership packages 2026-04-15 18:38:35 -04:00
diurnal_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
events.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
events_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
feedback.go feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:11:39 -04:00
guided.go fix: resolve remaining Go compilation errors across mqtt, analytics, localization, ingestion 2026-04-11 08:15:00 -04:00
integrations.go feat: home automation integration (MQTT and webhooks) 2026-04-11 06:29:51 -04:00
localization.go fix: resolve all test and vet failures across mothership packages 2026-04-15 18:38:35 -04:00
localization_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
notification_settings.go test(notify): add comprehensive tests for notification system 2026-04-13 17:42:26 -04:00
notification_settings_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
notifications.go api/notifications: register preview endpoint in main.go 2026-05-05 13:09:54 -04:00
notifications_test.go api/notifications: register preview endpoint in main.go 2026-05-05 13:09:54 -04:00
prediction.go feat: complete crowd flow visualization implementation 2026-04-11 07:27:21 -04:00
prediction_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
replay.go feat(replay): implement time-travel debugging with parameter tuning 2026-05-05 18:33:37 -04:00
replay_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
security.go feat: implement anomaly detection and security mode 2026-04-09 09:48:44 -04:00
security_test.go test: add missing GetSystemMode method to mockDetectorProvider 2026-04-11 06:39:16 -04:00
settings.go ota: implement auto-update with canary strategy and quiet window 2026-05-05 11:48:07 -04:00
settings_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
simulator.go simulator: fix GDOP overlay and shopping list JSON output 2026-05-05 23:34:43 -04:00
status.go api: register GET /api/status and GET /api/occupancy endpoints 2026-05-05 13:39:56 -04:00
tracks.go fix: resolve analytics API test failures and improve corridor response format 2026-04-11 08:34:24 -04:00
tracks_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
triggers.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
triggers_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
utils.go feat: verify dashboard WebSocket feed supports events, alerts, BLE, triggers, health 2026-04-07 09:54:14 -04:00
volume_triggers.go feat(triggers): add predicted_enter trigger type for pre-emptive automation 2026-05-24 10:35:24 -04:00
volume_triggers_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
zones.go api: complete GET /api/portals/:id/crossings endpoint 2026-05-05 14:31:31 -04:00
zones_test.go test(api/zones): add comprehensive test for GET /api/zones/:id/history 2026-05-05 17:27:32 -04:00