Prepare reports for Promptkit migration
This commit is contained in:
@@ -25,19 +25,14 @@ requires a change between its low, possible, likely, and high categories.
|
||||
| Comparator | Required snapshot data | Compared values |
|
||||
| --- | --- | --- |
|
||||
| `CompareDaily` | `derived_daily_summary`, `derived_daypart_summaries` | Low and high temperature, daily precipitation probability and timing, peak gust, alerts, and aggregate indicators |
|
||||
| `CompareThreeDay` | `derived_daypart_summaries` | Per-day temperatures, precipitation probability and timing, peak gust, indicators, and added or removed outlook days |
|
||||
| `CompareWeekend` | `derived_daypart_summaries` | The three-day values with weekend-prefixed change types |
|
||||
|
||||
For daily comparison, `alert_digest` and `precip_timing` are optional: alerts
|
||||
are compared when present, and timing is compared only when both snapshots
|
||||
contain it. The multi-day comparators build their day map from daypart
|
||||
summaries. A missing or added day becomes a dedicated change rather than a
|
||||
comparison against invented data.
|
||||
contain it.
|
||||
|
||||
The application selects a comparator only after state lookup establishes a
|
||||
compatible prior snapshot. Daily, Today, and Tomorrow use the daily comparator;
|
||||
Three-day and Weekend use their named comparators. Other report types, such as
|
||||
Storm, produce no Recent Changes list.
|
||||
compatible prior snapshot. Daily, Today, and Tomorrow use the daily comparator.
|
||||
Hourly reports do not produce a Recent Changes list.
|
||||
|
||||
## Missing data and failures
|
||||
|
||||
@@ -51,8 +46,8 @@ behavior. It does not decide report compatibility or retain snapshots.
|
||||
|
||||
## Verification and invariants
|
||||
|
||||
Focused tests cover the daily, three-day, and weekend strategies, threshold
|
||||
boundaries, indicator and alert changes, and missing required stanzas:
|
||||
Focused tests cover the daily strategy, threshold boundaries, indicator and
|
||||
alert changes, and missing required stanzas:
|
||||
|
||||
```sh
|
||||
go test ./internal/changes
|
||||
|
||||
Reference in New Issue
Block a user