Re-notify on still-active action-required signals at a configurable cadence #67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally filed by @coilysiren on 2026-05-01T17:41:25Z - https://github.com/coilysiren/repo-recall/issues/41
Problem
Today the push dispatcher fires exactly once per transition into action-required. See
State::diff_and_record_signalsand the dispatcher comment indocs/push-notifications.md. A signal id (<repo_id>:<signal>) is recorded inseen_signalson first notify, and only pruned when it disappears from the action-required set. A repo that stays broken for hours or days notifies once. If the toast is missed (phone off, DND, screen-locked-and-cleared), there is no re-notify until the signal clears and re-breaks.What this issue asks for
Make re-notification opt-in and time-based, deduped per signal id, with a configurable interval.
Behavior:
seen_signals): notify immediately, recordfirst_seen+last_notified = now. (Unchanged.)now - last_notified >= REPO_RECALL_RENOTIFY_SECS. On send, bumplast_notified.seen_signals. (Unchanged.)REPO_RECALL_RENOTIFY_SECS = 0disables re-notification (current behavior, kept as the default to avoid surprising existing installs).Schema change
Add
last_notified INTEGER NOT NULLtoseen_signalsinsrc/state.rs. Backfill is irrelevant since the state DB is the durable one but signal rows are cheap to recreate; on first boot after upgrade, treat missing column as a fresh schema (drop+recreate is fine forseen_signalsspecifically since the worst case is one extra notify per currently-broken repo).API change
Split
diff_and_record_signalsinto two responsibilities:diff_signals(current_ids) -> { new: Vec<String>, due_for_renotify: Vec<String> }- returns ids to actually push.record_notified(ids)- bumpslast_notifiedfor the ids that successfully dispatched.Pruning of disappeared ids stays in the diff step.
Config
REPO_RECALL_RENOTIFY_SECS00= never re-notify (today's behavior). Otherwise minimum seconds between re-notifies for the same signal id.Document in
AGENTS.mdenv table and indocs/push-notifications.mdunder "Push dispatcher."Test plan
state.rs: insert a signal, diff again with same ids andlast_notified = now-10sand renotify=60 -> not due. Diff again withlast_notified = now-120s-> due. Diff with id removed -> pruned.tests/smoke.rs: drive the dispatcher path with a fake subscription endpoint (existing pattern) and assert the renotify cadence honors the env var.Out of scope