123 Commits
Author SHA1 Message Date
jose 01e1f01ec6 Merge pull request 'Add push:watch diagnostic tool' (#7) from push-watch-tool into master
Reviewed-on: #7
2026-11-18 09:32:08 +00:00
Jose Olarte III 9f7647a447 Require opt-in and recipient allowlist for push:test 2026-11-18 16:55:53 +08:00
Jose Olarte III 6bbe5983ce add push preview and diagnostic test push commands
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.
2026-11-16 16:26:01 +08:00
Jose Olarte III 5443527470 sanitize AlertSearch scheduler failure logs
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.
2026-11-13 18:43:43 +08:00
Jose Olarte III f86ed76b12 add AlertSearch FCM scheduler execution history
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.
2026-11-13 18:12:37 +08:00
Jose Olarte III e4c6e72d89 sanitize FCM failure logs and document lazy push retention
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.
2026-11-13 17:40:05 +08:00
Jose Olarte III 7412806777 add per-device FCM outcome log for alert search pushes
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
2026-11-13 16:46:46 +08:00
Jose Olarte III 4fe133ba36 Avoid exposing cursor configuration values
Exclude future-dated push records from historical time windows
2026-11-13 16:11:33 +08:00
Jose Olarte III 9ef33404be Add push:watch diagnostic tool 2026-11-13 15:55:01 +08:00
trentlarson 965f5c0db5 add a renewal notification when all the search JWTs have been used 2026-11-09 20:17:49 -07:00
Jose Olarte III 149ca5b6e5 Say "info" and "update" instead of "claim" in AlertSearch notification lines.
Starred-project items that are not offers or gives now read as info, and other incoming items read as updates, so those lines no longer call them claims.
2026-11-04 18:39:32 +08:00
trentlarson d1171310f1 bump version and add "-beta" 2026-10-31 19:39:23 -06:00
trentlarson 83c3aef663 bump to version 0.2.7 0.2.7 2026-10-28 20:02:00 -06:00
Jose Olarte III a459685011 Drop unsupported FromYou AlertSearch categories.
AlertSearch does not return the requester's own actions, so offerFromYou, giveFromYou, and otherClaimFromYou are not real notification lines. Incoming claims stay classified as offers, gives, or other claims to the user.
2026-10-27 10:45:11 -04:00
Jose Olarte III 7d28de6bd3 Document the digest merge under Unreleased so the category push and the tap command are part of the next release notes. 2026-10-26 11:18:23 -04:00
jose 1ec9e4050d Merge pull request 'API Notification Digest' (#6) from api-notification-digest into master
Reviewed-on: #6
2026-10-26 15:00:55 +00:00
Jose Olarte III 6c50975d3c Merge branch 'master' into api-notification-digest 2026-10-26 10:47:48 -04:00
trentlarson f5f1ae4128 update FCM push notifications to behave like SMS (see recent changes) 2026-10-25 15:32:05 -06:00
trentlarson f6dce1003d restrict the send-multiple-SMS-per-day to authorized users 2026-10-25 13:57:21 -06:00
trentlarson 1b4b14ca19 allow sending of SMS notification if they turn off-and-on, even if they have already been checked or sent one today 2026-10-25 13:38:50 -06:00
trentlarson 7d4b6f3db8 bump version and add "-beta" 2026-10-25 13:28:29 -06:00
trentlarson a1e62dd2dc bump to version 0.2.6 0.2.6 2026-10-24 22:10:55 -06:00
trentlarson 5d3f589b5d add an SMS-watch utility 2026-10-24 22:07:30 -06:00
Jose Olarte III daeb7248e0 Merge branch 'master' into api-notification-digest 2026-10-21 16:39:07 -04:00
Jose Olarte III fc3cbd2bc0 Add a local command that sends one alert_search FCM to a chosen device so a notification tap can be tested without a daily run. 2026-10-20 11:35:27 -04:00
trentlarson 3f3736e81b bump version and add "-beta" 2026-10-19 11:21:26 -06:00
Jose Olarte III 0709c4f5c1 Put the AlertSearch update count in the FCM title so the body lists only the category lines. 2026-10-19 11:36:14 -04:00
trentlarson 3d2e3ae8aa bump to version 0.2.5 0.2.5 2026-10-18 15:36:31 -06:00
trentlarson e14a65d210 fix and finish the alertSearch query & results 2026-10-16 09:14:44 -06:00
trentlarson 0c67bfbc9b add /deep-link/new-activity on the end of the URL in SMS texts 2026-10-15 19:49:58 -06:00
trentlarson cdd84643db rename to "MESSAGE_ENV_LABEL" for both push & SMS 2026-10-15 19:44:00 -06:00
trentlarson ce6111d72b add to SMS text on certain environments 2026-10-15 19:29:31 -06:00
Jose Olarte III e60f6a7c83 Announce the same deduped AlertSearch total in FCM and SMS, and drop the claims category the query never returns. 2026-10-14 12:38:44 -04:00
Jose Olarte III 1781910504 Break the daily AlertSearch push down by update type so a give, an offer, and a nearby or similar match are not all reported as a bare total. 2026-10-14 12:20:39 -04:00
trentlarson a8d20f9f12 bump to version 0.2.4 0.2.4 2026-10-13 19:50:05 -06:00
trentlarson 19c1291ab5 send only new cursors to alertSearch; drop the ID-path handoff 2026-10-13 13:05:36 -06:00
trentlarson 84c4163e31 change after & before from jwtIds to new cursors 2026-10-13 12:37:23 -06:00
trentlarson f9f9774c12 doc: small tweaks to SMS plan 2026-10-05 21:34:32 -06:00
trentlarson 4db216a034 bump to version 0.2.3 2026-10-05 21:33:12 -06:00
Jose Olarte III 45dede8dfe Merge branch 'retire-legacy-notification' 2026-09-28 16:17:42 +08:00
trentlarson 32efcdf656 bump version and add '-beta' 2026-09-27 16:24:27 -06:00
Jose Olarte III 84b11e1fc8 Drop retired /notifications/refresh from the auth docs. 2026-09-25 15:10:57 +08:00
Jose Olarte III 2d2aeb2c3a Remove legacy /notifications/refresh and WAKEUP_PING producer. 2026-09-22 20:46:01 +08:00
Jose Olarte III 51b2c57e7d Stop starting the legacy WAKEUP_PING FCM scheduler. 2026-09-22 18:01:03 +08:00
Jose Olarte III 64431efdc4 bump to 0.2.2 after merging endpoint-query 0.2.2 2026-09-22 15:15:55 +08:00
Jose Olarte III d727476796 Merge branch 'endpoint-query' 2026-09-22 15:12:40 +08:00
Jose Olarte III c75060a7f1 Use singular “update” when the digest has one item so FCM and SMS bodies stay grammatical. 2026-09-18 16:54:09 +08:00
Jose Olarte III 77df676d6e Accept POST on /notifications/alert-authorization instead of PUT.
The path and payload stay the same; this matches how the client submits a batch.
2026-09-18 15:05:30 +08:00
Jose Olarte III 226925278f Move remaining alertSearch tests under test/.
Keep them beside the existing SMS alertSearch tests and update imports so they still load src/.
2026-09-18 14:53:41 +08:00
trentlarson 93168ae360 make the boolean checks consistent, and guard against mistakes 2026-09-14 11:43:22 -06:00