Repository navigation
Rely solely on lead-time tiering for confidence - #7
Merged
Merged
Conversation
Expose forecast confidence tiering in metadata and remove the multi-issuance confirmation mechanism. Added: - leadTimeDays and leadTimeTier (Warning/Watch/Outlook) in metadata on both gauge point and basin polygon features, plus in OutputSchema so they are usable in CloudTAK filters and highlight templates - Confidence line in remarks showing the headline severity's tier and lead time, and a tier tag in the gauge callsign Removed: - MIN_CONFIRMING_ISSUANCES and INCLUDE_PRELIMINARY_EVENTS env vars - buildConfirmedForecasts() and isSeverityConfirmed() - confirmed/preliminary metadata and schema fields, the (preliminary) callsign/remarks labels, and reduced polygon opacity - ConfirmedForecastRange, replaced by the simpler TieredForecastRange Lead-time tiering is grounded directly in Google's published model-skill data, which is the phenomenon that causes false urgency at long lead times. The confirmation check was a proxy for the same thing: it added a second env var, two methods, and retention of every issuance in a 7-day window, while having the least history to check against at exactly the short lead times where alerts matter most. fetchForecasts() now returns only the latest issuance per gauge instead of all issuances in the window, reducing per-run memory use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces forecast confidence tiering in metadata and removes the multi-issuance
confirmation mechanism, leaving lead-time tiering as the single confidence
signal.
Added
leadTimeDaysandleadTimeTier(Warning 0-2d / Watch 3-5d / Outlook 6+d)in
metadataon both gauge point and basin polygon features, and inOutputSchema— so they're usable in CloudTAK filter expressions andhighlight templates
Confidence: Watch (+4d lead time)line in remarks for the headlineseverity, plus a tier tag in the gauge callsign, e.g.
Flood Gauge — EXTREME (RISE) [Watch]Removed (breaking)
MIN_CONFIRMING_ISSUANCESandINCLUDE_PRELIMINARY_EVENTSenvironmentvariables
confirmedandpreliminaryfields from metadata andOutputSchema(preliminary)callsign/remarks labels and reduced polygon fill opacitybuildConfirmedForecasts(),isSeverityConfirmed(), and theConfirmedForecastRangetype (replaced by the simplerTieredForecastRange)Why
Lead-time tiering is grounded directly in Google's published model-skill data,
which measures the exact phenomenon behind false urgency at long lead times.
The confirmation check was a proxy for the same thing: it cost a second env var,
two methods, and retention of every forecast issuance in a 7-day window, while
having the least history to check against at exactly the short lead times
where alerts matter most — the opposite of where extra scrutiny is useful.
As a side effect,
fetchForecasts()now returns only the latest issuance pergauge instead of all issuances in the window, reducing per-run memory use.
Upgrade notes
Anything reading
metadata.confirmed/metadata.preliminary, or filtering onthem in CloudTAK, needs to move to
metadata.leadTimeTier/metadata.leadTimeDays. Both removed env vars can simply be dropped from layerconfig; they're no longer read.
Note there is no longer any way to suppress low-confidence alerts — everything
elevated is emitted, labeled with its tier. If that filtering is wanted later,
the cleaner form would be a
MIN_CONFIDENCE_TIERvar keyed off tiering ratherthan reintroducing issuance history.
Testing
npx tsc --noEmit— passesnpm run lint— passesnpm run build— passesnpm audit— 0 vulnerabilitiesgrepconfirms no leftover references to the removed symbols/varsNot verified: end-to-end run against the live Google Flood Forecasting API
(requires
API_KEY/ETL_*credentials), so the tier values on real gauge datahaven't been observed directly.