feat(notify): due-soon Taskwarrior notifications #5
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
public/kal!5
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/task-notify"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on #4 (
feat/today-tasks). Adds Taskwarrior due-soon pings to thekal notifydaemon, reusing the read-onlykal.tasksrunner.Behaviour
task_leadbefore it is due: title = description (truncated to about 80 chars), messagedue in 15 min · 21:00 · sospel(project omitted when empty).task:{uuid}@{due iso}, so moving the due re-arms it.waitstill in the future) and anything not pending (completed, deleted).task_morning, or on the first scan after it (keytask-today:{uuid}@{date}).Daemon
run_once(whentasksis on) queries onlystatus:pending due.after:now-1min due.before:now+<lead+tick+1m>plus+DUETODAY status:pending. Any task failure (not installed, timeout, garbage output, or an unexpected exception) is logged and swallowed, so event notifications keep working. The task runner is injectable (task_runner=).Config (
[notify], all defaults on)Tests
tests/test_notify_tasks.py(54 tests) covers timing and the poll-tick grace, dedup, re-arm on due change, the wait skip, the end-of-day morning ping and catch-up, DST spring/fall in Europe/Monaco, system-local vs explicit zone, and config parse/save. A daemon test with a fake runner proves that task errors don't break event notifications. The full suite passes underTZ=Europe/MonacoandTZ=UTC(364 passed), andruff check .is clean.🤖 Generated with Claude Code
The notify daemon now also pings for pending Taskwarrior tasks a configurable lead time before they are due ("due in 15 min · 21:00 · sospel"), reusing the read-only kal.tasks runner. - Pure due_task_notifications(): fires once per task per due time (key task:{uuid}@{due}, so moving the due re-arms it); skips non-pending and still-waiting (snoozed) tasks. - Date-only / end-of-day dues (local 00:00 or 23:59:59) get no 23:44 lead ping; they get one "due today" ping from task_morning instead (key task-today:{uuid}@{date}). Wall-clock rules are DST-safe. - run_once queries only the lead window plus +DUETODAY; any task failure is logged and swallowed so event notifications keep working. - Config under [notify]: tasks = true, task_lead = "15m", task_morning = "09:00". - Task gains status and wait fields parsed from the export. Co-Authored-By: Claude Opus 5.5 <[email protected]>