Skip to content

Add CAP adapter and NWS alerts pilot - #4

Merged
lukefretwell merged 1 commit into
mainfrom
cap-adapter
Sep 7, 2026
Merged

lukefretwell merged 1 commit into
mainfrom
cap-adapter

Conversation

@lukefretwell

Copy link
Copy Markdown
Member

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.

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
lukefretwell merged commit 0dd2718 into main Sep 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant