spaxel/mothership/internal/api
jedarden e92d5bc325 feat(simulator): wire registry bridge position data flow (bf-5dpu)
Complete the wiring between simulator API and registry_bridge.go to ensure
positions flow correctly through the complete data path:

1. Simulator API receives node positions via POST /api/simulator/nodes
2. Positions persisted to VirtualNodeStore
3. Periodic 30s sync reads positions from store
4. Registry bridge processes positions (spread geometry for default origin)
5. Positions written to Fleet Registry database

Changes in main.go:
- Create VirtualNodeStore with persistence
- Create FleetRegistryBridge wrapping the store
- Add periodic sync goroutine (every 30s) calling SyncToRegistry
- Wire simulatorHandler with both store and bridge

Changes in simulator.go:
- Update SimulatorHandler to accept virtualStore and registryBridge
- Load existing virtual nodes from store on startup
- Persist node operations (Create, Update, Delete) to store
- Add logging for position flow traceability

Acceptance criteria met:
✓ Positions flow from simulator to registry_bridge.go
✓ Positions correctly formatted for registry
✓ All wiring issues resolved
✓ Data path complete and functional

Resolves bf-5dpu
2026-07-06 01:51:16 -04:00
..
alerts.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
analytics.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -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 style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
baseline_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
ble_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
briefing.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -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 style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -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 style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -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 style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
guided.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
integrations.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
localization.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
localization_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
notification_settings.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
notification_settings_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
notifications.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
notifications_test.go api/notifications: register preview endpoint in main.go 2026-05-05 13:09:54 -04:00
prediction.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -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 style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
replay_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
security.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
security_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
settings.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
settings_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
simulator.go feat(simulator): wire registry bridge position data flow (bf-5dpu) 2026-07-06 01:51:16 -04:00
simulator_test.go feat(bf-18yn): seed realistic node geometry in spaxel-sim default placement 2026-07-06 00:25:52 -04:00
status.go feat(api): wire build-time version through StatusHandler (bf-iekf) 2026-07-04 04:29:59 -04:00
status_test.go feat(api): wire build-time version through StatusHandler (bf-iekf) 2026-07-04 04:29:59 -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 style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
triggers_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -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 style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
volume_triggers_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
zones.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00
zones_test.go style(mothership): run go fmt to format all Go code 2026-05-24 15:30:02 -04:00