feat: Sentry sustained-presence & panic alerts#161
Open
JordiMa wants to merge 2 commits into
Open
Conversation
Alert the owner when the vehicle stays in Sentry "Aware" (someone lingering around the vehicle) and when Sentry escalates to "Panic" (alarm), using the SentryMode telemetry stream. - Sustained presence: re-alerts every SENTRY_SUSTAINED_AWARE_SECONDS while Aware, capped at SENTRY_SUSTAINED_MAX_REPEATS, with a final "no more alerts for this incident" reminder; resets when the vehicle leaves Aware. - New first-class alert types (sustained_presence, sustained_presence_final, panic) shown distinctly on Telegram, push, and the in-app history (FR/EN). - Keeps the existing immediate Sentry alert on every Aware.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two security alerts driven by the SentryMode telemetry stream (the proven, streamable signal):
The existing immediate Sentry "Aware" alert is kept.
Behaviour
Configuration
The cap also protects against an infinite loop if the vehicle goes offline while Aware.
Implementation notes
sustained_presence,sustained_presence_final,panic) shown distinctly on Telegram, push, and the in-app history (FR/EN) — no generic fallback (resolveAlertTextsis an exhaustiveRecord<AlertEventType, …>, so a missing type is a compile error).SentryPresenceTrackerServicemanages a per-VIN re-alert interval with the cap + per-episode reset.alert_events_type_enum.Tests