Add push:watch diagnostic tool #7

Merged
jose merged 8 commits from push-watch-tool into master 2026-11-18 09:32:08 +00:00
Owner
No description provided.
jose added 1 commit 2026-11-13 07:55:27 +00:00
jose marked the pull request as work in progress 2026-11-13 07:55:31 +00:00
jose added 1 commit 2026-11-13 08:11:38 +00:00
Exclude future-dated push records from historical time windows
jose added 1 commit 2026-11-13 08:46:52 +00:00
Record each device attempted in an AlertSearch digest send in
alert_push_device_sends, with the FCM message id or error code and a
sanitized detail. FCM accepting a message does not mean the device
displayed it.

- alert_push_sends remains the DID-level daily-cap record, unchanged
- device rows link to it when one exists
- a failed device-log write is logged and does not change the send
  result or retry FCM
- push:watch adds a Device attempts view (key 5) and a per-DID
  summary, still read-only
jose added 1 commit 2026-11-13 09:40:11 +00:00
Log the FCM error code and a truncated description with the
registration token removed, instead of the raw exception message, in
the alert search send path. Stored outcomes and send counts are
unchanged.

Retention is unchanged at 30 days, shared by alert_push_sends and
alert_push_device_sends. Pruning is lazy and per DID on that DID's
next write; there is no global cleanup job.
jose added 1 commit 2026-11-13 10:12:43 +00:00
Record each FCM scheduler pass and the users it reviewed in two new tables, alert_search_scheduler_passes and alert_search_scheduler_runs, linked by pass id. Deferred users get a row too, so a pass that found no due work is still visible.
jose added 1 commit 2026-11-13 10:43:49 +00:00
Log the stage and safe error code for notification, daily-run,
renewal, and pass failures instead of the raw exception message. The
raw message can carry JWTs, FCM tokens, or URLs with credentials.

Keep attempted and failed counts outside the pass try block so an
unexpected pass-level failure records the counts reached so far.
Notification errors still count separately from daily-run failures.
A pending-query failure still records zero counts.
jose added 1 commit 2026-11-16 08:26:06 +00:00
Add two separate CLI commands. push:preview shows the notification and
eligible devices for a DID without sending. push:test sends one
diagnostic notification to exactly one registration, selected by both
DID and device id, and fails closed on a missing, inactive, other-DID,
or ambiguous registration.
jose added 1 commit 2026-11-18 08:55:59 +00:00
jose marked the pull request as ready for review 2026-11-18 09:31:53 +00:00
jose merged commit 01e1f01ec6 into master 2026-11-18 09:32:08 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: trent_larson/notification-wakeup-service#7