miroir/crates/miroir-core
jedarden 17b25e4cf1 feat(analytics): implement beacon idempotency and CDC integration (P5.21.f §13.21)
Implement analytics beacon endpoint with idempotency and CDC integration:

- Add `check_and_mark_beacon_event` to TaskStore trait for idempotency
- Implement for both Redis (HSET with 24h TTL) and SQLite (table with cleanup)
- Add JWT session extraction for session_id in beacon events
- Add server-side event_id generation fallback for old browsers (SHA256 hash)
- Integrate with CDC manager to publish AnalyticsEvents (click_through, latency)
- Respect cdc.emit_internal_writes for latency events
- Add Display impl for JwtValidationError for proper error logging
- Add jwt_decode_with_fallback helper for JWT rotation support
- Add unit tests for beacon idempotency (SQLite and Redis)

Closes: miroir-uhj.21.6
2026-05-25 02:48:55 -04:00
..
benches feat(bench): add performance benchmarks and regression gate (P9.5) 2026-05-25 00:44:33 -04:00
migrations P6.4: Mode B leader-only singleton coordinator (plan §14.5) 2026-05-23 05:21:16 -04:00
proptest-regressions feat(tests): add property tests and fuzz targets for router, config, and parsers (plan §8, P9.6) 2026-05-24 11:41:48 -04:00
src feat(analytics): implement beacon idempotency and CDC integration (P5.21.f §13.21) 2026-05-25 02:48:55 -04:00
tests fix(tests): update meilisearch_sdk API usage for v0.27 2026-05-25 01:44:23 -04:00
Cargo.toml feat(cdc): implement Kafka sink for CDC events (P5.13.c) 2026-05-24 13:41:40 -04:00
proptest.toml P1.6: Verify property tests and benchmarks for router 2026-05-23 10:21:56 -04:00