miroir/crates
jedarden 829d1331f1 feat(reshard): implement verify phase (P5.1.d, §13.1 step 4)
Implements cross-index PK set + content hash comparator for online
resharding. Once backfill completes, the verify phase compares the
live and shadow indexes to ensure data consistency before alias swap.

Key implementation:
- Iterates every shard of live (old_shards) and shadow (new_shards)
  via filter=_miroir_shard={id} paginated scan
- Streams PKs + content fingerprints into PK-keyed xxh3 buckets
  (reuses §13.8's bucketed-Merkle machinery with PK-keyed bucketing
   instead of shard-keyed, enabling comparison across different S)
- Asserts: (a) live PK set == shadow PK set, (b) content_hash matches
- Returns VerificationResults with discrepancies if any

Acceptance criteria:
- Live PK set size equals shadow PK set size
- Zero PKs only in live index
- Zero PKs only in shadow index
- Zero PKs with content hash mismatch

Closes: miroir-uhj.1.4

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 04:02:28 -04:00
..
miroir-core feat(reshard): implement verify phase (P5.1.d, §13.1 step 4) 2026-05-24 04:02:28 -04:00
miroir-ctl feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
miroir-proxy feat(explain): implement Query Explain API (plan §13.20) 2026-05-24 03:48:22 -04:00