From 58afecd7b76dedfdc89f201e48545fc8d12640de Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 6 Jun 2026 12:48:46 +0530 Subject: [PATCH] test(verifier): widen weighted-selection assertion to a 5x skew margin --- internal/verifier/verifier_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/verifier/verifier_test.go b/internal/verifier/verifier_test.go index b511957..2a1c82e 100644 --- a/internal/verifier/verifier_test.go +++ b/internal/verifier/verifier_test.go @@ -339,8 +339,11 @@ func TestNextAction_WeightedSelectsByWeight(t *testing.T) { awayCount++ } } - if awayCount <= homeCount { - t.Errorf("expected away-skewed distribution, got home=%d away=%d", homeCount, awayCount) + // Weights are 99:1, so away must dominate by a wide margin. Requiring a 5x + // skew (rather than a bare >) keeps the assertion robust to harmless picker + // reshuffles while still failing if the weight is ignored or inverted. + if awayCount <= 5*homeCount { + t.Errorf("expected away to outweigh home by >5x (weights 99:1), got home=%d away=%d", homeCount, awayCount) } }