Skip to main content

Add Deterministic Ramp-Up

Add one rollout rule that is stable for the same identity input.

Prerequisites: You have completed Evaluate in App Code.

Ramp-up assignment is deterministic and exposed through stable bucket APIs.

import io.amichne.konditional.api.evaluate
import io.amichne.konditional.context.AppLocale
import io.amichne.konditional.context.Context
import io.amichne.konditional.context.Platform
import io.amichne.konditional.context.Version
import io.amichne.konditional.core.Namespace
import io.amichne.konditional.core.id.StableId

object RolloutFeatures : Namespace("rollout") {
val newCheckout by boolean<Context>(default = false) {
rule(true) {
rampUp { 25 }
}
}
}

val sameUser = Context(AppLocale.UNITED_STATES, Platform.IOS, Version.of(2, 1, 0), StableId.of("user-123"))
val first = RolloutFeatures.newCheckout.evaluate(sameUser)
val second = RolloutFeatures.newCheckout.evaluate(sameUser)
check(first == second)

Verify

Use RampUpBucketing.bucket(stableId, featureKey, salt) when you need explicit bucket introspection for debugging and audit traces.

Expected Outcome

After this step, the same stable identity is consistently included or excluded across repeated evaluations.

Next Steps

Claim Coverage

Claim IDStatement
CLM-PR01-10ARamp-up assignment is deterministic and exposed through stable bucket APIs.