prop/rust/prop_grid_rs/src
Graham McIntire 9e776a07d5
fix(skewt): write profile files for f01..f18 forecast hours
The /skewt page was empty in prod because Phase 2 of the Rust cutover
moved f01..f18 grid scoring to Rust but left profile-file writing only
on the analysis (f00) path. Result: /data/scores/profiles/ accumulated
one file per chain run instead of nineteen, so SkewtLive only ever saw
the analysis hour — and that hour falls outside the 1 h past cutoff
within an hour of the chain finishing, leaving the page empty most of
the time.

Two surgical fixes:

  * `pipeline::run_chain_step` now builds `profile_entries` alongside
    `prepared` from the merged grid in a single iter pass, then spawns
    `profiles_file::write_atomic` on the blocking pool to overlap the
    NFS write with the score-band scoring/write fan-out — same pattern
    `run_analysis_step` already uses. `ChainStepStats` gains
    `profile_cells_written` so the worker log line is symmetric with
    the analysis step's existing field and a future failure mode that
    drops the profile would show up as a divergence.

  * `SkewtLive.available_valid_times/0` widens the past cutoff from
    1 h to 3 h. The chain's analysis hour can be ~70 min old by the
    time the next chain finishes (and ~2 h on a missed cycle), so the
    1 h cutoff was leaving the page blank during normal transients.
    18 h forward window unchanged.

Cosmetic: cargo fmt picked up trivial rewrites in decoder/fetcher/
native_duct/hrrr_point_worker that had drifted; rolled in.

Verification: cargo build --release, cargo clippy --lib --bins -D
warnings, cargo test --lib (134/134), mix test
test/microwaveprop_web/live/skewt_live_test.exs (3/3) all green.
2026-04-25 12:58:10 -05:00
..
bin fix(skewt): write profile files for f01..f18 forecast hours 2026-04-25 12:58:10 -05:00
band_config.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
commercial.rs fix(commercial): decode commercial_links.id as Uuid, not i64 2026-04-20 09:21:10 -05:00
db.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
decoder.rs fix(skewt): write profile files for f01..f18 forecast hours 2026-04-25 12:58:10 -05:00
duct.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
fetcher.rs fix(skewt): write profile files for f01..f18 forecast hours 2026-04-25 12:58:10 -05:00
grid.rs feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
hrrr_points.rs fix: three more Rust/Elixir contract drift bugs on /map and /weather 2026-04-24 14:04:02 -05:00
lib.rs chore(grid-rs): retrigger Rust CI to heal ImagePullBackOff 2026-04-24 08:54:49 -05:00
metrics.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
native_duct.rs fix(skewt): write profile files for f01..f18 forecast hours 2026-04-25 12:58:10 -05:00
nexrad.rs chore(rust): drop easily-inlined deps (anyhow, bytes, byteorder, num_cpus) 2026-04-24 12:13:25 -05:00
pipeline.rs fix(skewt): write profile files for f01..f18 forecast hours 2026-04-25 12:58:10 -05:00
profiles_file.rs fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
region.rs fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
scorer.rs feat(scorer): retire HPBL multiplier and native-duct 1.15× boost 2026-04-25 12:42:56 -05:00
scores_file.rs chore(rust): drop easily-inlined deps (anyhow, bytes, byteorder, num_cpus) 2026-04-24 12:13:25 -05:00
sounding_params.rs fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
telemetry.rs chore(rust): drop OpenTelemetry stack to speed up cold builds 2026-04-24 09:11:43 -05:00