prop/lib/microwaveprop
Graham McIntire 7b78a2574c
fix(workers): 3 bug/perf fixes from codebase review
1. GridCache: auto-release fill lock when the claimer process crashes.
   claim_fill/1 + release_fill/1 go through the GenServer so the
   server can Process.monitor the caller and clean up the ETS entry
   on :DOWN. Clear/0 now resets both the data table and the lock
   table. Fixes a latent bug where a crashed fill leaked the lock
   indefinitely, preventing every subsequent /weather mount for that
   valid_time from claiming and leaving cache cold.

2. RadarFrameWorker: distinguish permanent vs transient fetch errors.
   404 from the IEM n0q archive is permanent (file will never exist)
   and marks contacts :unavailable as before. Any other error shape
   (5xx, timeout, transport failure) now returns {:error, reason}
   so Oban retries — previously those also pinned contacts at
   :unavailable after a transient outage.

3. AdminTaskWorker.native_derive: replace per-row Repo.update_all
   (N round-trips + N fsyncs) with one UPDATE ... FROM unnest(...)
   per 2000-row batch. For the 10k-profile budget this is one
   network round trip per chunk instead of 10k, and one fsync per
   chunk instead of 10k. Restructured the clause to separate
   derivation (pure) from persistence (I/O).

All three changes are test-covered (grid_cache_test auto-release
test, radar_frame_worker_test 5xx + transport tests, existing
admin_task_worker_test native_derive coverage exercises the new
bulk path). Also drops the scorer_diff no-op test that was
verifying the clause removed in 61da51c.
2026-04-21 09:53:13 -05:00
..
accounts feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
backtest Fix all 12 dialyzer warnings 2026-04-11 18:08:18 -05:00
beacon_monitors Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
beacons Short-circuit RangeEstimate below 5.76 GHz to stop browser lockup 2026-04-14 16:56:24 -05:00
callsign_location Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
commercial Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
ionosphere feat(telemetry): broaden Instrument span coverage 2026-04-18 17:25:33 -05:00
prom_ex perf(telemetry): cut hot-path overhead on scores_at cache hits 2026-04-20 16:12:01 -05:00
propagation chore(cleanup): drop dead scorer_diff + DB grid fallback; harden NotifyListener 2026-04-21 09:42:35 -05:00
qrz feat(telemetry): broaden Instrument span coverage 2026-04-18 17:25:33 -05:00
radio refactor(contacts): rename propagation_mechanism_status -> mechanism_status 2026-04-21 09:28:37 -05:00
space_weather feat(telemetry): broaden Instrument span coverage 2026-04-18 17:25:33 -05:00
terrain feat(telemetry): broaden Instrument span coverage 2026-04-18 17:25:33 -05:00
weather fix(workers): 3 bug/perf fixes from codebase review 2026-04-21 09:53:13 -05:00
workers fix(workers): 3 bug/perf fixes from codebase review 2026-04-21 09:53:13 -05:00
accounts.ex feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
application.ex feat(propagation): add ScoreCacheReconciler + pipeline runbook 2026-04-21 09:24:16 -05:00
backtest.ex refactor: normalize pos1/pos2 JSONB key to 'lon' everywhere 2026-04-17 09:10:32 -05:00
beacon_monitors.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
beacons.ex Convert /beacons approved list to live_table 2026-04-12 17:15:05 -05:00
cache.ex Cache /contacts, fix map blink, make mode optional 2026-04-12 12:47:25 -05:00
callsign_location.ex Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
commercial.ex Hoist commercial link query + tie pipeline chip to ScoresFile 2026-04-14 15:01:12 -05:00
format.ex feat(format): miles-primary distance formatting sitewide 2026-04-18 15:53:40 -05:00
geo.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
geocoder.ex feat(telemetry): broaden Instrument span coverage 2026-04-18 17:25:33 -05:00
instrument.ex feat(telemetry): wide instrumentation + bump hrrr to 2 per pod 2026-04-18 16:33:34 -05:00
ionosphere.ex Sporadic-E physics module + Ionosphere.nearest_foes 2026-04-15 14:43:48 -05:00
mailer.ex Send mail as prop@w5isp.com with reply-to graham@mcintire.me 2026-04-12 14:00:38 -05:00
markdown.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
prom_ex.ex feat(telemetry): PromEx Prometheus exporter at /metrics 2026-04-18 16:39:39 -05:00
propagation.ex perf(telemetry): cut hot-path overhead on scores_at cache hits 2026-04-20 16:12:01 -05:00
qrz.ex Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
radio.ex feat(admin): surface flagged contacts on the contact-edits page 2026-04-19 12:40:20 -05:00
release.ex Drop propagation_scores table, ScoresFile is the only store 2026-04-14 15:13:01 -05:00
repo.ex initial 2026-03-28 11:28:47 -05:00
repo_listener.ex Replace polling with Postgres LISTEN/NOTIFY for live updates 2026-04-02 16:26:22 -05:00
space_weather.ex SpaceWeather: SWPC JSON ingestion (Kp, F10.7, GOES X-ray) 2026-04-15 14:55:24 -05:00
terrain.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
weather.ex chore(cleanup): drop dead scorer_diff + DB grid fallback; harden NotifyListener 2026-04-21 09:42:35 -05:00