Phase 1 (miroir-cdo): Core Routing enhancements and group fallback
This commit includes enhancements to the Phase 1 Core Routing implementation:
merger.rs:
- Improve binary heap implementation with stable sorting
- Add descending_cmp helper method for consistent ordering
- Enhance tie-breaking by primary key for identical scores
search.rs:
- Add group fallback functionality for failed shards
- Refactor search_with_group for better testability
- Track failed shard IDs for targeted retry
- Add MAX_FALLBACK_ATTEMPTS to prevent cascading failures
scatter.rs:
- Update for consistency with new search flow
These enhancements build on the completed Phase 1 implementation:
- Router tests: 26/26 pass (rendezvous hashing, covering set)
- Merger tests: 15/15 pass (global sort, facets, offset/limit)
- Topology tests: 39/39 pass (node health state machine)
- Scatter tests: 7/7 pass (stub implementation)
- Coverage: router.rs (96.76%), topology.rs (100%), scatter.rs (100%), merger.rs (95.45%)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>