miroir/crates/miroir-core/tests
jedarden 2d4211938a fix(hedging): implement proper timeout-based hedging for p95 latency
Fixes the hedging logic to properly avoid slow nodes by using tokio::time::timeout
instead of the previous race-condition-prone tokio::select! approach.

Key changes:
- execute_hedged_request: Use timeout on primary request, then hedge if timeout
- This ensures that when the primary is slow (> p95 * multiplier), we cancel it
  and use the hedge result instead
- Fixed make_test_topology to set groups to Active state (pre-existing bug)

All 4 hedging chaos acceptance tests now pass:
- p5_2_a1: Slow node avoided via hedging
- p5_2_a2: p95 latency close to healthy baseline
- p5_2_a3: max_hedges prevents thundering herd
- p5_2_a4: Writes never hedge

Closes: miroir-uhj.2 (P5.2 §13.2 Hedged requests for tail-latency mitigation)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 23:12:09 -04:00
..
chaos.rs fix: various code style improvements and type fixes 2026-05-24 16:17:05 -04:00
cutover_race.rs Phase 0 (miroir-qon): Foundation verification complete 2026-05-08 20:37:17 -04:00
dfs_skewed_corpus.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
hash_fixtures.rs feat(hedging): implement tail-latency hedging for reads (§13.2, miroir-uhj.2) 2026-05-24 07:30:16 -04:00
integration.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
merger_proptest.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
p3_redis_integration.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p3_sqlite_restart.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p3_task_store_proptest.proptest-regressions P1.6: Verify property tests and benchmarks for router/merger 2026-05-23 13:03:54 -04:00
p3_task_store_proptest.rs P6.5: Mode C work-queued chunked jobs - complete worker processing logic 2026-05-23 07:04:53 -04:00
p4_topology_chaos.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
p13_2_hedging_chaos.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
p13_3_adaptive_replica_selection.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p13_4_query_planner.rs style: apply cargo fmt formatting 2026-05-24 09:00:33 -04:00
p13_5_drift_reconciler.rs test(miroir-core): add drift reconciler acceptance tests (P5.5.d §13.5) 2026-05-24 22:21:14 -04:00
p13_7_alias_acceptance_tests.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p13_8_anti_entropy.rs fix(anti_entropy): fix compilation issues with feature-gated Mode A tests 2026-05-24 08:15:06 -04:00
p13_10_idempotency_coalescing.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p13_18_canary_acceptance_tests.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
p22_write_path.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p22_write_path_acceptance.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p23_search_read_path.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
p25_task_reconciliation.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p28_api_compatibility.rs style: apply cargo fmt formatting changes 2026-05-24 03:03:42 -04:00
p42_node_addition.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
p43_node_drain.rs fix(hedging): implement proper timeout-based hedging for p95 latency 2026-05-24 23:12:09 -04:00
p44_replica_group_addition.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
router_proptest.proptest-regressions P1.5: Implement scatter module with covering-set construction + dispatch trait 2026-04-19 00:20:29 -04:00
router_proptest.rs feat(multi-search): implement timeout enforcement and acceptance tests (§13.11) 2026-05-24 01:54:20 -04:00
task_store.proptest-regressions Phase 0 (miroir-qon): Re-verify foundation completion 2026-05-09 02:25:45 -04:00
task_store.rs feat(hedging): implement tail-latency hedging for reads (§13.2, miroir-uhj.2) 2026-05-24 07:30:16 -04:00
task_store_redis.rs Phase 0 (miroir-qon): Final verification complete - all DoD criteria met 2026-05-09 07:00:22 -04:00