prop/lib/microwaveprop/propagation
Graham McIntire 07ffcf52d7
Flip map read path to ScoresFile, stop writing grid HRRR profiles
Read-side cutover for the binary scores store and a companion
cleanup that removes the biggest remaining DB write from the hot
path.

Propagation.scores_at/3, available_valid_times/1, latest_valid_time/0,
latest_valid_time/1, earliest_valid_time/1, point_detail/4, and
point_forecast/3 all now prefer ScoresFile and fall back to the
propagation_scores table when a file is missing. The map render
path reads from /data/scores first; Postgres stays as a safety
net while dual-write is on. point_detail still pulls factors from
Postgres (analysis-hour rows only) and coalesces nil to an empty
map so the JS popup iterates cleanly.

replace_scores/2 is now gated by a postgres_writes_enabled? flag
(runtime env MICROWAVEPROP_SCORES_POSTGRES=false, or the
:propagation_scores_postgres app env key) so the binary-only path
can be benchmarked locally without the DB insert. Default stays
true.

PropagationGridWorker no longer calls store_hrrr_profiles —
persisting 92k grid rows × 19 forecast hours of JSONB profiles
was ~12 min of wall time per chain for a table only
AsosAdjustmentWorker read from. Per-contact HRRR enrichment
through HrrrFetchWorker still writes its own (is_grid_point:
false) rows. AsosAdjustmentWorker is disabled in all three cron
configs since its data source is gone.

DataCase resets the scores tree between tests so per-test
ScoresFile writes don't leak across cases, and ScoresFileTest
switches to async: false because it mutates the global
:propagation_scores_dir env.
2026-04-14 14:50:43 -05:00
..
asos_nudge.ex Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
band_config.ex Refresh propagation algo against expanded prod corpus (2026-04-13) 2026-04-13 10:59:01 -05:00
duct.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
freshness_monitor.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
grid.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
grid_score.ex Cut propagation_scores write cost with DELETE+COPY, skip-factors, UNLOGGED 2026-04-14 13:47:35 -05:00
inversion.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
pipeline_status.ex Show all executing pipeline workers in the status chip 2026-04-14 14:04:44 -05:00
rain_scatter.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
recalibrator.ex Fix all 12 dialyzer warnings 2026-04-11 18:08:18 -05:00
region.ex Phase 7: Regionalized seasonal scoring 2026-04-10 08:39:01 -05:00
score_cache.ex Add more caching to make the map feel instant 2026-04-12 12:26:25 -05:00
scorer.ex Wire NEXRAD, native ducts, and commercial links into scoring 2026-04-13 12:08:15 -05:00
scorer_diff.ex Cut propagation_scores write cost with DELETE+COPY, skip-factors, UNLOGGED 2026-04-14 13:47:35 -05:00
scores_file.ex Flip map read path to ScoresFile, stop writing grid HRRR profiles 2026-04-14 14:50:43 -05:00