Remove unused alert envelope retention
This commit is contained in:
@@ -48,6 +48,8 @@ metadata summary, checked-empty alerts and SPC outlooks remain distinct from
|
||||
missing sources, and prompt-safe SPC values omit geometry and other
|
||||
template-only or source details. The complete module composition is in
|
||||
[module internals](module.md); fact derivation is in [fact contracts](facts.md).
|
||||
Alert digests are built from selected alert items and source provenance, not a
|
||||
provider response envelope.
|
||||
|
||||
Derived daypart-summary maps use the forecast package's canonical daypart
|
||||
identity and reject any collision instead of replacing an earlier value.
|
||||
|
||||
@@ -16,6 +16,9 @@ story, and convective outlook data. Source provenance and warnings are copied
|
||||
into their own slices so downstream consumers can inspect data completeness
|
||||
without treating it as an ordinary weather fact.
|
||||
|
||||
Alert facts retain individual alert payloads for period selection together with
|
||||
their copied source provenance; they do not retain a provider response envelope.
|
||||
|
||||
A nil bundle produces an empty collected value. Collection itself, missing
|
||||
source policy, and source hashes are outside this package.
|
||||
|
||||
|
||||
@@ -31,6 +31,10 @@ provider endpoint or retry policy from the normalized types. See
|
||||
[collection](collect.md) for assembly and
|
||||
[report templates](../templates.md) for the values exposed to authors.
|
||||
|
||||
An alert run retains its check time and individual alert payloads for overlap
|
||||
selection. Its source entry retains provider provenance; the full provider
|
||||
envelope is not carried into the normalized bundle.
|
||||
|
||||
## Source provenance
|
||||
|
||||
Every checked source is represented by a `Source` entry. The record identifies
|
||||
|
||||
@@ -308,7 +308,7 @@ func (b *bundleBuilder) fetchAlerts(acquired sourceAcquisition) error {
|
||||
}
|
||||
raw, source := fetched.raw, fetched.source
|
||||
if isJSONNull(raw) {
|
||||
b.bundle.Alerts = &weatherdata.AlertRun{Raw: append(json.RawMessage(nil), raw...)}
|
||||
b.bundle.Alerts = &weatherdata.AlertRun{}
|
||||
b.addSource(source)
|
||||
return nil
|
||||
}
|
||||
@@ -316,7 +316,6 @@ func (b *bundleBuilder) fetchAlerts(acquired sourceAcquisition) error {
|
||||
if err := decodeSource(raw, &alerts); err != nil {
|
||||
return b.handleMalformed(&source, err, acquired.request)
|
||||
}
|
||||
alerts.Raw = append(json.RawMessage(nil), raw...)
|
||||
if alerts.AsOf != nil {
|
||||
source.IssuedAt = alerts.AsOf
|
||||
}
|
||||
|
||||
@@ -148,7 +148,6 @@ func (p ForecastPeriod) HasValidPrecipitationProbability() bool {
|
||||
type AlertRun struct {
|
||||
AsOf *time.Time `json:"asOf,omitempty"`
|
||||
Alerts []json.RawMessage `json:"alerts,omitempty"`
|
||||
Raw json.RawMessage `json:"raw,omitempty"`
|
||||
}
|
||||
|
||||
type Discussion struct {
|
||||
|
||||
Reference in New Issue
Block a user