spaxel/mothership/internal/fleet
jedarden 2c8bbcf646
Some checks are pending
CI Benchmark - Fusion Loop Timing / Fusion Loop Timing Benchmark (push) Waiting to run
fix(fleet): remove duplicate route registration to prevent chi panic
- Remove duplicate node-specific routes (role, label, locate, delete) from
  FleetHandler.RegisterRoutes to avoid chi panic on duplicate registration
- Keep only unique FleetHandler routes: /api/fleet/health, /api/fleet/history,
  /api/fleet/optimise, /api/fleet/simulate
- Add startup smoke test TestRouteRegistrationNoPanic to verify both Handler
  and FleetHandler can be registered on same router without panic

main.go registers both fleet.NewHandler and fleet.NewFleetHandler on the
same router, which previously caused chi to panic due to duplicate routes:
  POST /api/nodes/{mac}/role
  PATCH /api/nodes/{mac}/label
  POST /api/nodes/{mac}/locate
  DELETE /api/nodes/{mac}

The Handler has comprehensive node/room/mode endpoints while FleetHandler
focuses on health/optimization/simulation, so duplicates are removed from
FleetHandler.

Closes: bf-3o15x
2026-05-24 09:47:54 -04:00
..
collision.go Implement TX slot collision detection and adaptive re-stagger 2026-05-06 08:28:24 -04:00
collision_debug_test.go Implement TX slot collision detection and adaptive re-stagger 2026-05-06 08:28:24 -04:00
collision_test.go Implement TX slot collision detection and adaptive re-stagger 2026-05-06 08:28:24 -04:00
fleet_test.go Implement TX slot collision detection and adaptive re-stagger 2026-05-06 08:28:24 -04:00
fleethandler.go fix(fleet): remove duplicate route registration to prevent chi panic 2026-05-24 09:47:54 -04:00
handler.go fleet: add idle role to validRoles and add disable/enable tests 2026-05-05 14:10:52 -04:00
handler_test.go fix(fleet): remove duplicate route registration to prevent chi panic 2026-05-24 09:47:54 -04:00
healer.go feat(diagnostics): implement link weather diagnostics and repositioning advice 2026-03-29 11:48:38 -04:00
healer_test.go feat(signal): implement Phase 5 Reliability & Intelligence 2026-03-29 12:16:56 -04:00
manager.go Implement TX slot collision detection and adaptive re-stagger 2026-05-06 08:28:24 -04:00
optimiser.go feat: add new internal packages (events, automation, ble, falldetect, mqtt, notify, prediction, sleep, tracker, zones, analytics) and dashboard modules (anomaly, automations, blepanel, fleet) 2026-04-06 09:48:31 -04:00
registry.go fleet: add idle role to validRoles and add disable/enable tests 2026-05-05 14:10:52 -04:00
selfheal.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
selfheal_test.go feat: add new internal packages (events, automation, ble, falldetect, mqtt, notify, prediction, sleep, tracker, zones, analytics) and dashboard modules (anomaly, automations, blepanel, fleet) 2026-04-06 09:48:31 -04:00
weather.go feat(diagnostics): implement link weather diagnostics and repositioning advice 2026-03-29 11:48:38 -04:00