From 9f4f2aade8fa9c80e9a0eb97de52517991d1d5b2 Mon Sep 17 00:00:00 2001 From: Tim Claridge Date: Sun, 14 Jun 2026 11:39:45 +1200 Subject: [PATCH] fix: Percentiler returns 100 for the max score; build against local-stack SNAPSHOTs getPercentile used 'value > _max', so the highest score ever seen returned ~99 instead of 100, contradicting the method's javadoc. Use '>=' to match the documented contract. Also pin sibling deps to local SNAPSHOTs (ooo-util 1.6, narya 1.20, nenya/nenya-tools 1.7.3, depot 1.9). Co-Authored-By: Claude Opus 4.8 --- core/pom.xml | 10 +++++----- .../com/threerings/parlor/rating/util/Percentiler.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index e5d6ae35..db809645 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -16,24 +16,24 @@ com.threerings ooo-util - 1.5 + 1.6-SNAPSHOT com.threerings narya - 1.17 + 1.20-SNAPSHOT com.threerings nenya - 1.7 + 1.7.3-SNAPSHOT com.threerings nenya-tools - 1.7 + 1.7.3-SNAPSHOT true @@ -45,7 +45,7 @@ com.samskivert depot - 1.8 + 1.9-SNAPSHOT true diff --git a/core/src/main/java/com/threerings/parlor/rating/util/Percentiler.java b/core/src/main/java/com/threerings/parlor/rating/util/Percentiler.java index a4fc584b..b1c90297 100644 --- a/core/src/main/java/com/threerings/parlor/rating/util/Percentiler.java +++ b/core/src/main/java/com/threerings/parlor/rating/util/Percentiler.java @@ -213,7 +213,7 @@ public class Percentiler { if (value < _min) { return 0; - } else if (value > _max) { + } else if (value >= _max) { return 100; } else { return _percentile[toBucketIndex(value)];