Skip to content

[Bug] Telemetry events rejected due to strict future createdAt validation (Clock Skew) #210

Description

@abarghoud

Criticité : 🟠 Moyenne (Fait perdre des événements de télémétrie valides, mais rares)
Occurrences (sur 28 j) : 3 occurrences (décalages mesurés jusqu'à 1 min 20 sec)

Description of the issue
AlertsOffensiveResponseService drops telemetry events if their createdAt timestamp is slightly in the future compared to the API server's current time. Logs show timestamps from Tesla's fleet telemetry arriving up to ~1 minute and 20 seconds in the future. The current clockSkewToleranceMs (30 seconds) is too strict.

Steps to Reproduce

  1. Receive a telemetry event with a createdAt timestamp 60 seconds in the future (due to NTP drift on Tesla's servers).
  2. The event is rejected and logged as an error.

Expected Behavior
Increase the clockSkewToleranceMs to at least 5 minutes (300,000 ms) to accommodate natural clock drifts across distributed systems.

Logs

[OFFENSIVE] Future createdAt timestamp received: "2026-07-27T12:04:16.109289933Z"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions