Skip to content

Commit 8ac7bb3

Browse files
Update docs/architecture-decisions/high-precision-fractional-bucketing.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Michael Beemer <[email protected]>
1 parent 15ea16c commit 8ac7bb3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/architecture-decisions/high-precision-fractional-bucketing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ func calculateBucketAllocations(variants []fractionalEvaluationVariant, totalWei
203203
indices[i] = i
204204
}
205205
sort.Slice(indices, func(i, j int) bool {
206+
if allocations[indices[i]].buckets == allocations[indices[j]].buckets {
207+
return allocations[indices[i]].variant < allocations[indices[j]].variant // Tie-break by variant name
208+
}
206209
return allocations[indices[i]].buckets > allocations[indices[j]].buckets
207210
})
208211

0 commit comments

Comments
 (0)