spaxel/mothership/internal/api
jedarden 747638ed1d test(bf-3y9r): verify simulator positions reach fusion accumulation grid
bf-3y9r (verify position propagation). The wiring from prior children
(bf-5lii -> bf-69ym -> bf-u7ds -> bf-95tx) already traces a posted node
position through simulator VirtualNodeStore -> fleet.Registry (SQLite) ->
fusion.Engine.nodePos mirror, and bf-95tx's TestPositionPropagation_
FullPipeline logs the value agreeing at all three stages. What was missing
was a single end-to-end assertion that those positions reach the engine's
*accumulation grid* and actually drive localization -- the last inch the
bead's acceptance criterion ("Verify positions reach the fusion engine
accumulation grid") asks for.

Add TestPositionPropagation_ReachesAccumulationGrid: posts two
explicitly-positioned nodes through the simulator REST API, runs one Fuse
step with a link between the two MACs the engine now holds, and asserts a
blob localizes near the link midpoint (confidence 1.0, 1 active link). A
blob there is only reachable if both endpoints' positions are in the grid
lookup -- AddLinkInfluence reads nodePos[mac] for both endpoints, and a
missing/co-located position yields no peak
(cf. TestEngine_CoLocatedOriginYieldsNoPeaks). The grid trace logs the
value's path under `go test -v`:

  [grid] position propagation  midpoint=(3.00,1.00)  peak=(2.90,0.90,0.90) conf=1.000 activeLinks=1

No production wiring change was needed -- prior children completed it; this
bead is verification, with this test as its lock-in.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-06 13:30:19 -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-3y9r): verify simulator positions reach fusion accumulation grid 2026-07-06 13:30:19 -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