From 4ed672e7dcbde2216d1920dd8ceb3568dd1c2ea3 Mon Sep 17 00:00:00 2001 From: Josh Poole Date: Thu, 10 Sep 2026 09:30:56 +0100 Subject: [PATCH] 20260910 - Feed the tracker from blah2_api, not from retina-gui Turns on network.tracker_forward and points it at the sidecar's real address. The default names 'blah2_tracker:3012', a container from blah2's own compose that does not exist here; retina-tracker runs with network_mode host and binds loopback, so it is 127.0.0.1:30100. blah2_api enriches each frame with ADS-B truth before forwarding, so the tracker now gets the annotated frame rather than the bare one. That is where a track's adsb_hex comes from, and it is a better frame than retina-gui was sending. Also gives the tracker its control port, which is what makes the handover possible at all. Auto-Calibrate resets the tracker between candidate towers and at the start of every dwell, and it used to do that with a message mixed into the detection socket. It cannot any more: that socket accepts one connection at a time and blah2_api holds it. POST /reset is its own door. This has to ship with retina-gui's matching change and never before it. Exactly one process may feed that socket, and until retina-gui stops, it is the one holding it. Co-Authored-By: Claude Opus 5 (1M context) --- config/default.yml | 19 +++++++++++++++---- docker-compose.yml | 10 ++++++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/config/default.yml b/config/default.yml index 798d8e0..2ff9448 100644 --- a/config/default.yml +++ b/config/default.yml @@ -63,11 +63,22 @@ network: node_id: "ret000000000" - # Forward detections to external tracker container + # Forward detections to the retina-tracker sidecar. blah2_api enriches each + # frame with ADS-B truth before forwarding, so the tracker gets the annotated + # frame rather than the bare one, which is where a track's adsb_hex comes from. + # + # 127.0.0.1 rather than a container name: retina-tracker runs with + # network_mode host and binds loopback only (--tcp-host 127.0.0.1), and + # blah2_api is on the same host network. The default 'blah2_tracker:3012' + # names a container from blah2's own compose, which does not exist here. + # + # This must stay in step with retina-gui: the tracker's ingest socket accepts + # one connection at a time, so exactly one process may feed it. retina-gui + # stopped forwarding in the same release that turned this on. tracker_forward: - enabled: false - host: 'blah2_tracker' - port: 3012 + enabled: true + host: '127.0.0.1' + port: 30100 truth: adsb: diff --git a/docker-compose.yml b/docker-compose.yml index eb369b8..3093d42 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -176,11 +176,17 @@ services: condition: service_completed_successfully # --tcp-host 127.0.0.1 (not the image's 0.0.0.0 default): network_mode # host means 0.0.0.0 would bind the real host interface, exposing the - # ingest port to the LAN. retina-gui is always colocated on this same - # host, so loopback-only is sufficient. + # ingest port to the LAN. blah2_api (which feeds it) and retina-gui (which + # controls it) are both colocated on this same host, so loopback-only is + # sufficient for both ports. + # + # --control-port carries POST /reset and GET /health. Auto-Calibrate needs + # the reset between candidate towers, and it cannot ride the ingest socket + # any more: that accepts one connection at a time and blah2_api owns it. command: > python -m retina_tracker.track_detections --tcp --tcp-host 127.0.0.1 --tcp-port 30100 + --control-host 127.0.0.1 --control-port 30101 -s /app/output/events.jsonl -c /config/retina-tracker.yaml --blah2-config /config/config.yml