monoscope/test/unit/Models/Telemetry
Anthony Alaribe 92b4bfddb2 fix(telemetry): eliminate TS/TF end_time sub-µs divergence
monoscope built UTCTime from OTel nanoseconds via a lossy Double /1e9
(a 2026 ns value ~1.78e18 exceeds Double's 52-bit mantissa) and sent
full-precision ISO-8601 text to both engines. Postgres/TimescaleDB
rounds excess fractional digits on ::timestamptz while
DataFusion/TimeFusion truncates, so ~39% of rows landed exactly 1µs
apart, breaking exact-timestamp equality/joins across the two stores.

- nanosecondsToUTC: exact integer picosecond math (MkFixed ns*1000)
- roundUTCToMicros + tsColumn: µs-quantize (round-half-up) the wire
  text so both engines parse an identical <=6-digit value. Covers
  end_time, start_time, observed_timestamp.

Rounding keeps TimescaleDB's existing values unchanged and pulls TF
onto them. Adds TimestampMicrosSpec regression guard.
History 2026-07-14 18:04:31 -07:00
..
DeterministicIdSpec.hs fix(ingest): deterministic content-derived row id so DLQ replay is idempotent (#445) 2026-06-25 23:14:24 +02:00
MetricServiceNameSpec.hs Fix metric service name extraction (#454) 2026-07-02 09:54:50 -07:00
TimestampMicrosSpec.hs fix(telemetry): eliminate TS/TF end_time sub-µs divergence 2026-07-14 18:04:31 -07:00