FA-73890 / Feature flag rollout bucketing / Member archive
Weighted variant allocation: Fractional weights are truncated to basis points · case 05
A 0.29 percent arm covers only 28 buckets and 33.33 percent splits leak buckets.
Case contract
variants is an ordered list of [name, weight percent with at most two decimals]; bucket is an integer in [0, 10000). Walk variants in declared order, skipping non-positive weights, adding round(weight * 100) to a running total, and return the first variant whose total exceeds the bucket. Buckets beyond the total go to the last positively weighted variant; with none, None.
Why this case matters
Variant splits decide which arm of a flag a user receives and must honour declared weights exactly.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fractional weight 0.29 covers 29 buckets | "rest" | "tiny" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗