spaxel/mothership/internal/sleep
jedarden 77a2fbc9c0 test: implement acceptance scenario integration tests (AS-1 through AS-6)
- Added comprehensive integration tests in test/acceptance/ covering all 6 acceptance scenarios from plan.md
- AS-1: First-time setup in under 5 minutes - verifies PIN setup and node auto-discovery
- AS-2: Person detected while walking - verifies blob detection during walker simulation
- AS-3: Fall alert fires correctly - verifies fall detection with webhook integration
- AS-4: BLE identity resolves to person name - verifies BLE device registration and identity matching
- AS-5: OTA update succeeds / rollback on bad firmware - verifies OTA workflow and rollback
- AS-6: Replay shows recorded history - verifies replay session creation, seeking, and playback

Tests use spaxel-sim CLI as the test harness and verify:
- API endpoint responses (/api/auth/setup, /api/nodes, /api/blobs, /api/events, /api/ble/devices, /api/replay/*)
- Detection accuracy thresholds (>60% blob presence during walking)
- Alert generation and webhook delivery
- Firmware version updates and rollback behavior
- Replay session lifecycle management

All tests skip by default unless ACCEPTANCE_TEST=1 or SPAXEL_INTEGRATION_TEST=1 is set.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 05:45:15 -04:00
..
analyzer.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
analyzer_test.go feat(sleep): implement overnight sleep quality monitoring 2026-03-29 17:48:29 -04:00
breathing_acceptance_test.go test: add breathing rate FFT and anomaly acceptance tests 2026-04-07 02:54:31 -04:00
breathing_anomaly.go fix: resolve Phase 6 build integration issues 2026-04-07 02:31:02 -04:00
breathing_anomaly_test.go feat: add breathing rate FFT extraction and anomaly flagging for sleep monitoring 2026-04-07 01:15:34 -04:00
breathing_estimator.go feat: add breathing rate FFT extraction and anomaly flagging for sleep monitoring 2026-04-07 01:15:34 -04:00
breathing_estimator_test.go feat: add breathing rate FFT extraction and anomaly flagging for sleep monitoring 2026-04-07 01:15:34 -04:00
handler.go feat: wire anomaly detection & security mode API endpoints 2026-04-07 15:09:34 -04:00
integration.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
integration_test.go feat(sleep): implement overnight sleep quality monitoring 2026-03-29 17:48:29 -04:00
monitor_test.go feat: complete anomaly detection & security mode dashboard UI 2026-04-09 05:59:54 -04:00
records.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
report.go fix: resolve Phase 6 build integration issues 2026-04-07 02:31:02 -04:00
storage.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00