Skip to content

v1.1.0

Choose a tag to compare

@ShawnStrasser ShawnStrasser released this 15 Sep 02:51
· 1 commit to main since this release
e38ba72
Rebuild alarm and preempt counts from a multi-day timeline

The alarm and preempt history files existed because a caller that only
keeps one day of timeline locally cannot recompute six weeks of daily
counts. A caller with its own timeline store can. generate() now treats
the latest day in `timeline` as the report day: the clearance and
conflict checks look at that day only, while the alarm and preempt
counters use every day present, so passing up to 42 days (older days
trimmed to alarm and Preempt rows) rebuilds the counts each run with
nothing to persist. One-day callers are unchanged: days present in the
timeline replace the matching history rows, other history rows are kept.

New optional `device_days` input (DeviceId, Date) tells the preempt
check which days each signal reported data, since a trimmed day no
longer has the timeline span that presence was inferred from.

Alarm alerts and preempt alerts are now anchored to the report day
explicitly rather than to the latest date that happened to have data.

ALARM_EVENT_CLASSES, FLASH_EVENT_CLASSES, ALARM_HISTORY_DAYS and
PREEMPT_HISTORY_DAYS are exported at package level. Version 1.1.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdMhC2NWpghbMnG612oM87