fix(cyclones): name the classification and mark a stale cache in shared context

- Publish classificationName next to the raw NHC code; unknown codes stay
  unexpanded.
- Publish staleCacheFetchedAt only while the proxy serves its cache.
- Touch the shared store on clear only after this layer published, so a
  feed failure no longer evicts another layer's dangling selection.
- Drop the unreachable no-storm branch and the unused return value.
- Tests: split the heading fixture into due north and stationary, cover
  the unavailable and failure paths with the real store, and check that
  clear/disable leave another layer's selection alone; fold the fake-store
  test into the real-store one.
This commit is contained in:
German Khokhlov committed 2026-11-06 19:43:04 +04:00
1 parent aca5317a2a
commit 4e518821b5
3 files changed
+247 -147

No files matched your search

+6 -6
View File
@@ -743,12 +743,12 @@ NHC movement speed is converted from miles per hour to rounded knots by the
proxy; advisory wind intensity is already in knots and is passed through.
Cyclone markers, labels, tracks and cones are hidden beyond the horizon on every map source.
Explicit cyclone selections publish one shared `weather-cyclones` record
with official advisory provenance and source position. Switching storms removes
the prior record; automatic row selection never claims global context, and
refreshes do not re-announce selection. Clearing or losing an explicitly selected
storm removes shared context rather than assigning a fallback.
Deliberate clear/disable reports `deliberate`; feed disappearance reports
`evicted`. Switching storms selects the replacement before pruning the old record.
with official advisory provenance, source position, the English classification
name and, while the proxy serves its cache, the cache fetch time. Switching
storms selects the replacement before pruning the old record; automatic row
selection never claims global context, and refreshes do not re-announce
selection. Deliberate clear/disable reports `deliberate`; losing the selected
storm from the feed reports `evicted` and assigns no fallback.
Consult the linked official advisory for safety decisions.
Voice and HUD snapshots reuse the existing feedState classifier. Analyst follow-ups retain their original data provenance; current-view results append provenance without replacing legacy fields. HUD context and deterministic telemetry include non-nominal feed state.