spaxel/dashboard
jedarden 8a8b605a0b ota: implement auto-update with canary strategy and quiet window
Implements Component 6 from the plan - automatic OTA updates with canary
deployment strategy and configurable quiet window scheduling.

Features:
- Canary strategy: updates one node first, monitors detection quality
  for 10 minutes (configurable), then rolls out fleet-wide if quality
  degradation is below threshold (default 5%)
- Quiet window: configurable time range (default 02:00-05:00) when
  auto-updates are allowed. Supports overnight windows (e.g., 22:00-06:00)
- Zone vacancy check: only updates when all zones have been vacant
  for >10 minutes
- Auto-update mode toggle: enable/disable via settings
- REST API endpoints for status, config, trigger, cancel, and history
- Dashboard integration for real-time progress updates

Settings keys:
- auto_update_enabled: bool (default false)
- quiet_window_start: HH:MM format (default "02:00")
- quiet_window_end: HH:MM format (default "05:00")
- canary_duration_min: 5-60 minutes (default 10)
- auto_update_quality_threshold: 0.01-0.5 (default 0.05)

Implementation:
- internal/ota/autoupdate.go: AutoUpdateManager with canary selection,
  monitoring, and fleet rollout
- internal/ota/autoapi.go: REST API handlers
- internal/autoupdate/adapters.go: integration with quality provider,
  node provider, event notifier, zone vacancy checker
- internal/api/settings.go: auto-update settings with validation
- dashboard/js/ota.js: auto-update state tracking

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 12:41:39 -04:00
..
css fix(dashboard): fix Three.js OrbitControls touch event handling 2026-05-04 02:27:00 -04:00
js ota: implement auto-update with canary strategy and quiet window 2026-05-05 12:41:39 -04:00
node_modules feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
test-results feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
tests feat(dashboard): add axe-core accessibility CI gate for all dashboard pages 2026-04-24 18:31:17 -04:00
ambient.html feat(explainability): detection explainability overlay with per-link contributions, Fresnel zones, and BLE identity 2026-04-24 19:23:55 -04:00
fleet.html feat(explainability): detection explainability overlay with per-link contributions, Fresnel zones, and BLE identity 2026-04-24 19:23:55 -04:00
help_articles.json feat(dashboard): polish tap-to-jump UX and remove expert-mode gating 2026-04-24 23:16:56 -04:00
index.html feat(explainability): detection explainability overlay with per-link contributions, Fresnel zones, and BLE identity 2026-04-24 19:23:55 -04:00
integrations.html feat(explainability): detection explainability overlay with per-link contributions, Fresnel zones, and BLE identity 2026-04-24 19:23:55 -04:00
jest.config.js feat: implement spatial quick actions context menu for 3D scene 2026-04-10 22:56:17 -04:00
live.html fix(dashboard): fix Three.js OrbitControls touch event handling 2026-05-04 02:27:00 -04:00
package-lock.json feat(dashboard): add axe-core accessibility CI gate for all dashboard pages 2026-04-24 18:31:17 -04:00
package.json feat(dashboard): add axe-core accessibility CI gate for all dashboard pages 2026-04-24 18:31:17 -04:00
playwright.config.js feat(dashboard): add axe-core accessibility CI gate for all dashboard pages 2026-04-24 18:31:17 -04:00
README.md feat(dashboard): add axe-core accessibility CI gate for all dashboard pages 2026-04-24 18:31:17 -04:00
setup.html feat(explainability): detection explainability overlay with per-link contributions, Fresnel zones, and BLE identity 2026-04-24 19:23:55 -04:00

Spaxel Dashboard

Running Tests

Unit Tests (Jest)

npm test

Accessibility Tests (axe-core + Playwright)

# First-time setup: install browsers
npx playwright install --with-deps chromium

# Run accessibility gate
npm run test:a11y

The accessibility test loads each dashboard page (index, live, fleet, setup, integrations) via a local static server and asserts zero WCAG 2A/2AA violations using @axe-core/playwright. CI fails the build if any violation is introduced.

CI Integration (Argo Workflows)

Add the following step to the spaxel-build WorkflowTemplate before the container build:

- name: a11y-gate
  container:
    image: node:20-bookworm-slim
    command: [sh, -c]
    args:
      - |
        cd dashboard
        npm ci
        npx playwright install --with-deps chromium
        npm run test:a11y
    resources:
      limits:
        memory: 512Mi
        cpu: "1"