spaxel/mothership/internal/api
jedarden c69b0f7ca1 test(bf-95tx): integration test tracing positions through simulator→registry→fusion
bf-95tx wants a single demonstrable verification that node positions flow
through every runtime stage the position-propagation work touched. bf-69ym
locked in simulator→fleet-registry; bf-u7ds locked in simulator→fusion. This
adds the missing end-to-end lock-in that ties both together in one run.

TestPositionPropagation_FullPipeline wires the production chain behind the
SimulatorHandler (handler → bridge.SyncToRegistry → adapter → fleet.Registry
SQLite, with adapter forwardPos → fleet.Manager.ForwardNodePosition → sink →
fusion.Engine.SetNodePosition), posts one node with an explicit position,
then reads that SAME position back from all three stages and asserts they
agree — at both AddNode and UpdateNode. A pipelineStages helper logs each
stage's value so `go test -v` visibly traces the value's path:

  [create] position propagation  simulator={1.5 2.5 1}  registry={1.5 2.5 1}  fusion={1.5 2.5 1}
  [update] position propagation  simulator={3.5 4.5 2}  registry={3.5 4.5 2}  fusion={3.5 4.5 2}

The update leg also asserts no stage still holds the stale pre-update value
and that a single node stays a single node at every stage (no orphan/dup).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-06 13:13:28 -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(bf-5lii): wire immediate registry sync on simulator node create/update 2026-07-06 11:46:43 -04:00
simulator_test.go test(bf-95tx): integration test tracing positions through simulator→registry→fusion 2026-07-06 13:13:28 -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