Add CAP adapter and NWS alerts pilot - #4
Merged
Merged
Conversation
alerts was built from the Common Alerting Protocol specification without ever seeing a real feed, so this is the most direct test available of whether modelling on the incumbent standard actually works. It does. Real CAP from the live NWS alerts API validated first time with zero unmapped values - every enumeration mapped directly, and no schema change was needed to accept the data. That is the clearest evidence so far for the rule in SPEC section 1.4, and it contrasts with the profiles invented from scratch, where three earlier adapters found six defects between them. One real defect. The profile required references on an update or cancel, but alert feeds are windowed: ten of twenty-five alerts in the batch were updates, and every one superseded an alert that had already expired out of the active feed. The only conformant option was downgrading messageType from update to alert, which turns 'this supersedes an earlier warning' into 'this is a new warning'. For a warning system that is the wrong message, not a rounding error. referencesIdentifier now carries the CAP identifier of a superseded alert that is absent from the dataset, and an update or cancel must supply one or the other. Sharpens the open geospatial question rather than answering it. The profile references geometry by URL because a warning polygon is thousands of coordinate pairs and alerts travel over constrained channels; NWS inlines the polygon in the same document. The adapter links to the alert's own endpoint, which is a workaround rather than a mapping - a publisher that inlines geometry currently has nowhere to put it. Five datasets now run in the check pipeline: the reference fixtures plus four real publishers.
lukefretwell
force-pushed
the
cap-adapter
branch
from
September 7, 2026 16:53
f2dc495 to
59d3e0f
Compare
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.
alerts was built from the Common Alerting Protocol specification without ever seeing a real feed, so this is the most direct test available of whether modelling on the incumbent standard actually works.
It does. Real CAP from the live NWS alerts API validated first time with zero unmapped values - every enumeration mapped directly, and no schema change was needed to accept the data. That is the clearest evidence so far for the rule in SPEC section 1.4, and it contrasts with the profiles invented from scratch, where three earlier adapters found six defects between them.
One real defect. The profile required references on an update or cancel, but alert feeds are windowed: ten of twenty-five alerts in the batch were updates, and every one superseded an alert that had already expired out of the active feed. The only conformant option was downgrading messageType from update to alert, which turns 'this supersedes an earlier warning' into 'this is a new warning'. For a warning system that is the wrong message, not a rounding error. referencesIdentifier now carries the CAP identifier of a superseded alert that is absent from the dataset, and an update or cancel must supply one or the other.
Sharpens the open geospatial question rather than answering it. The profile references geometry by URL because a warning polygon is thousands of coordinate pairs and alerts travel over constrained channels; NWS inlines the polygon in the same document. The adapter links to the alert's own endpoint, which is a workaround rather than a mapping - a publisher that inlines geometry currently has nowhere to put it.
Five datasets now run in the check pipeline: the reference fixtures plus four real publishers.