FA-73873 / Feature flag rollout bucketing / Member archive
Weighted variant allocation: Zero-weight arms participate in allocation · case 03
A variant switched off with weight zero still receives remainder traffic, and negative weights shrink totals.
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 |
|---|---|---|---|
| trailing zero weight arm does not absorb remainder | "off" | "treatment" | 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 ↗