From ca56303bde2dd11eb259f51c33b5d1d96495502e Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 27 Sep 2026 20:15:28 +0200 Subject: Fix final review: hourly rebuild, validate overrides and voice templates - daemon(): key the rescan on signature(cfg) and the current hour, not just signature, so a quiet calendar keeps advancing its notification window instead of going stale after ~1 day. - load_overrides(): validate each value is a list of parseable durations, raising ValueError(f"override {uid!r}: ...") otherwise; the daemon's existing reload try/except keeps the previous config on failure. - load_config(): validate the say/say_now voice templates format cleanly against a stub summary/in, catching bad placeholders at load time. - notify(): pass "--" to notify-send so a summary starting with "-" is not parsed as an option. - daemon(): rebuild voice_ready() on config reload so voice changes (enabled, model path) apply without a restart. - parse_choice(): lowercase input so "Reset"/"NONE" work from rofi -i. - notify(): note the overlapping-say-children limitation with a ponytail comment naming the upgrade path. - README/spec: document the hourly rebuild and its effect on in-place .ics edits. Co-Authored-By: Claude Opus 5.5 --- docs/superpowers/specs/2026-09-27-cal-notif-design.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/superpowers/specs') diff --git a/docs/superpowers/specs/2026-09-27-cal-notif-design.md b/docs/superpowers/specs/2026-09-27-cal-notif-design.md index 4d02f90..f2bfea1 100644 --- a/docs/superpowers/specs/2026-09-27-cal-notif-design.md +++ b/docs/superpowers/specs/2026-09-27-cal-notif-design.md @@ -92,8 +92,9 @@ For each event occurrence, the offsets are the first of: Every 30 s: 1. **Rescan** the `.ics` files when any calendar directory's mtime changed - (vdirsyncer rewrites files there), and when the config or overrides file's - mtime changed. + (vdirsyncer rewrites files there), when the config or overrides file's + mtime changed, and every hour regardless, so the window keeps moving even + when nothing changed. 2. **Expand** events into concrete occurrences within a window `[now, now + largest offset in use + 1 day]`. The window follows the largest offset, so a "1 week before" alarm is never dropped. @@ -104,7 +105,8 @@ Every 30 s: from there. - Floating times are local time. The result is a sorted list of `(fire_time, occurrence, offset)`, - recomputed only on rescan. + recomputed on rescan, which also runs every hour so the window keeps + moving. 3. **Fire** every entry with `last_tick < fire_time <= now`, skipping those older than `now - late` and those whose occurrence already started (except offset 0, the "now" alarm). -- cgit v1.2.3