The persisted grid_data files contain atoms (:base_m, :top_m, :thickness_m, :min_freq_ghz, :native_min_gradient, :ducts, etc.) that live in modules which aren't eagerly loaded during application start. warm_grid_cache_from_latest_profile runs in Application.start/2 before those modules get pulled in by their first call sites, so [:safe] was rejecting our own legitimate files at boot — every weather page hit crashed with "invalid or unsafe external representation of a term". The whole point of [:safe] is to refuse atoms from untrusted external ETF input. ProfilesFile.write!/2 in this same module is the only writer of these files, so the input is trusted by definition — drop the flag. The test additions round-trip the production data shape including duct fields as a regression guard. |
||
|---|---|---|
| .. | ||
| microwaveprop | ||
| microwaveprop_web | ||
| mix/tasks | ||
| microwaveprop.ex | ||
| microwaveprop_web.ex | ||