Commit graph

3 commits

Author SHA1 Message Date
jedarden
7afbdc9441 test: add CI benchmark gate for fusion loop timing budget
Add BenchmarkFusionLoop and TestTimingBudgetProduction that enforce the fusion loop timing budget as a CI quality gate per plan §Quality Gates / Definition of Done (item 9).

The benchmark runs the full fusion pipeline (phase sanitization → feature extraction → Fresnel accumulation → peak extraction → UKF update) against synthetic CSI data from spaxel-sim output.

Timing constraints:
- Median fusion iteration < 15ms (production target)
- Median fusion iteration < 30ms (CI threshold - 2x allowance for slower CI hardware)
- P99 < 40ms (hard limit)

Typical results on reference hardware:
- Median: ~3-5ms (well under 15ms production target)
- P99: ~14-20ms (well under 40ms hard limit)

Also includes:
- GitHub Actions workflow (.github/workflows/benchmark-ci.yml) for CI
- Documentation (docs/ci-benchmark-integration.md) for Argo Workflows integration

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 06:34:50 -04:00
jedarden
b1c2218146 feat: wire anomaly detection & security mode API endpoints
AnomalyDetector initialized in main() with periodic model updates.
Anomaly events broadcast to dashboard WS as 'alert' messages via
BroadcastAlert. GET /api/anomalies?since=24h lists recent events.
POST /api/security/arm and /api/security/disarm manage security mode.
GET /api/security/status returns armed state, learning progress, and
24h anomaly count. Arm/disarm state persisted to learning_state table
and restored on restart.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 15:09:34 -04:00
jedarden
60a21bacb6 feat: add end-to-end integration test harness
Implements a comprehensive e2e test system that:
- Starts mothership container/binary
- Waits for /healthz with 15s timeout
- Handles PIN auth setup if needed
- Runs CSI simulator against mothership
- Asserts during run (health, nodes online, blob detection)
- Validates frame rate doesn't drop >20%
- Asserts detection events recorded

Components added:
- mothership/cmd/sim: CSI simulator that generates synthetic frames
- mothership/tests/e2e: Go test suite with WebSocket assertions
- tests/e2e/run.sh: Shell script with comprehensive assertions
- .github/workflows/e2e.yml: CI workflow for automated testing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 12:40:25 -04:00