mirror of
https://github.com/gadgethd/ukmesh.git
synced 2026-12-06 19:24:41 +00:00
* fix(rf): on-demand repeater footprints + nightly coverage refresh Two independent faults made the per-repeater RF coverage action look broken and the coverage refresh infrequent: - The WebSocket initial_state slim projection dropped public_key, so the map's "Show RF coverage" action only appeared for repeaters that had arrived through a live node_upsert. Include it in the slim query and the slimmer, so every repeater offers the action (about 440 KB added to an 8.2 MB initial state, well inside the 16 MiB cap). - Nothing ever invoked the calculator's `-node` mode. Add a bounded, deduplicated on-demand queue to hopreach-shareapi on a separate `share.public_listen_addr` listener (plan-share/admin stay loopback), proxied by the app's nginx at `POST /rf-coverage/nodes/<key>/request`. Jobs share the calculator's singleton lock and retry while a whole-region run holds it (30 s for ten attempts, then every 5 min for up to 6 h). - schedule.cron was weekly (`0 1 * * 0`) despite the site promising a nightly refresh; make it `0 1 * * *`. The nginx route uses a named regex capture: `$1` is global per request and the client-IP map overwrites it for limit_req's key on trusted-edge requests, which silently proxied the client IP instead of the key. * test(rf): avoid a 64-hex literal and allowlist the public repeater fixture Gitleaks treats a bare 64-hex string as a candidate key. Build the test fixture at runtime and record the advertised repeater public key in the existing MeshCore-identity allowlist (the same treatment the MQTT test fixtures already have). * fix(rf): bound one node-job child with a 15-minute timeout A stuck DEM fetch would otherwise hold the calculator's singleton lock indefinitely, blocking both later on-demand requests and the nightly whole-region run. * fix(rf): make unavailable repeater footprints visible in the map A silent repeater (most of the network) or one outside the region wrote no node_coverage entry, so the map kept saying "Pending calculation" — indistinguishable from a broken button. Record a failed entry with the reason instead; repeaters that already have tiles keep them and show as stale. * ui(rf): label an unavailable footprint as Unavailable, not a failed calculation Silent repeaters are the majority of the network; calling the refusal "Calculation failed" reads like a bug. The specific reason is already shown in the coverage panel. * fix(api): isolate stats quotas and bound client request storms * fix(rf): make scheduled coverage runs wait and honor cron slots --------- Co-authored-by: gadgethd <111318106+gadgethd@users.noreply.github.com>