Add a new narrative forecast module and remove the unimplemented daily forecast stub

This commit is contained in:
2026-06-10 08:24:50 -05:00
parent 7b760a0823
commit c3da3af2f4
19 changed files with 255 additions and 44 deletions

View File

@@ -129,8 +129,8 @@ name the variable only; they should not contain the token value.
- `default`: missing-source behavior for optional sources. One of `error`, `warn`, or `none`. Default: `warn`.
- `sources`: optional map of source-specific overrides, using the same policy values.
Hourly forecast data is required for generated reports. Optional sources and
stub source slots use the missing-source policy.
Hourly forecast data is required for generated reports. Optional sources use
the missing-source policy.
### `scriptorium`
@@ -196,6 +196,7 @@ reports:
deterministic_modules:
- metadata
- current_conditions
- narrative_forecast
- id: area_forecast_discussion
options:
sections:
@@ -209,8 +210,8 @@ combinations, duplicate stanza names, and invalid options fail config loading.
includes all available AFD sections.
The module registry accepts all module IDs documented in
[Module Contract Internals](internal/module.md). Modules without builders are
valid in composition but do not emit YAML stanzas.
[Module Contract Internals](internal/module.md). Unknown or unimplemented
module IDs fail validation instead of being skipped.
## Secrets

View File

@@ -89,10 +89,6 @@ source-specific `missing_source.sources` policy:
- `discussion` for `/discussion`
- `weather_story` for `/weatherstories/latest`
The adapter also creates a missing stub source record for `daily` because that
source slot exists in the internal bundle but is not fetched from the Weather
API.
Policy behavior:
- `error`: fail the fetch for that source

View File

@@ -27,15 +27,14 @@ Outputs:
- `ModuleDefinition` values with module ID, stanza name, option type,
supported reports, fact requirements, missing-data behavior, and builder
- `module.Output` values for source-oriented stanzas:
`metadata`, `current_conditions`, `alert_digest`,
`metadata`, `current_conditions`, `narrative_forecast`, `alert_digest`,
`area_forecast_discussion`, and `weather_story`
- `module.Output` values for derived stanzas:
`derived_daily_summary`, `derived_daypart_summaries`, `precip_timing`,
`outdoor_windows`, and `tomorrow_planning`
The registry also contains accepted composition entries for modules that do not
emit stanzas until a builder exists. App orchestration skips those entries when
constructing snapshots.
Every registered composition entry has a builder. Unknown or unimplemented
module IDs fail validation instead of being skipped.
## Boundaries

View File

@@ -31,6 +31,7 @@ The registry recognizes these IDs:
- `metadata`
- `current_conditions`
- `narrative_forecast`
- `derived_daily_summary`
- `derived_daypart_summaries`
- `precip_timing`

View File

@@ -39,6 +39,7 @@ report:
briefing:
metadata: {}
current_conditions: {}
narrative_forecast: {}
recent_changes:
items: []
```

View File

@@ -22,7 +22,6 @@ Outputs:
- `weatherdata.Bundle` with observation, current conditions, hourly forecast,
narrative forecast, active alerts, discussion, latest weather story, source
records, and source warnings
- stub source record for the daily forecast source slot
- optional saved bundle JSON through app fetch helpers
## Boundaries
@@ -70,7 +69,7 @@ data is required and cannot be skipped.
- HTTP errors, response read failures, and envelope decode failures include
endpoint context.
- Missing hourly data or hourly forecasts with no periods fail bundle fetch.
- Optional and stub sources follow missing-source policy.
- Optional sources follow missing-source policy.
- Explicit `data: null` from `/alerts/active` produces an empty, non-missing
alert run.