monoscope/static
Anthony Alaribe a22e26fe90 fix(errors): record when the recent trace was captured, closing F13
The residual half of the trace/timestamp mismatch. Readers pin a +/-5min window
to the timestamp taken alongside recent_trace_id, so the two have to move
together — and they cannot, because recent_trace_id is deliberately throttled to
at most one write per five minutes per pattern (rewriting it per occurrence
breaks HOT and bloats heap/TOAST on the hottest path in the product) while
updated_at is written on every occurrence.

Migration 0145 adds recent_trace_at, set in the *same* CASE branch as the id, so
they cannot drift again. Nullable with no backfill: the value is only knowable at
write time, so a row acquires one the next time its pattern recurs, and the page
keeps the previous approximation as a fallback until then.

Read with a dedicated scalar rather than widening ErrorPattern: that record is
decoded positionally from explicit column lists in several queries, and widening
it would mean touching all of them on the error-ingest path to serve one page.

The earlier fix (356968f5e) was exact only when the recent trace happened to be
the first one. This makes it exact whenever the pattern has recurred since the
migration.

28 examples, 0 failures, migration applied.
History 2026-09-04 17:20:09 +02:00
..
i18n Add infrastructure inventory views 2026-08-27 15:00:05 +02:00
migrations fix(errors): record when the recent trace was captured, closing F13 2026-09-04 17:20:09 +02:00
migrations-pending fix(ingest): make legacy event retries idempotent 2026-08-20 21:44:19 +02:00
public feat(issues): make the query-alert page show the breach 2026-09-03 21:15:15 +02:00