miroir/crates/miroir-proxy
jedarden 69a6ade107 P5.10 §13.10 Idempotency keys + query coalescing
## What
- Idempotency cache for write deduplication with SHA256 body hashing
- Query coalescing for identical concurrent search requests
- Config options for TTL, max entries, coalescing window, max subscribers

## Why
HTTP retries, SDK retry loops, and at-least-once delivery produce duplicate writes.
Hot identical search queries waste caching opportunities.

## Details
- Accept Idempotency-Key header for writes
- Return cached mtask ID on hit, 409 conflict on key reuse with different body
- Query fingerprint includes canonical JSON + index UID + settings version
- Settings change invalidates in-flight coalesce (settings_version in fingerprint)
- 50ms default coalescing window closes at response time

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 13:58:09 -04:00
..
src P5.10 §13.10 Idempotency keys + query coalescing 2026-05-23 13:58:09 -04:00
static Phase 5: Add Advanced Capabilities verification and UI static assets 2026-05-03 19:01:22 -04:00
tests P2.2: Add write path acceptance tests 2026-05-23 13:01:33 -04:00
Cargo.toml P4.1: Rebalancer background worker - verification complete 2026-05-23 08:11:31 -04:00