Skip to main content

Why Typed Flags

String-key feature systems fail in predictable ways under scale. Konditional shifts those failures into compile-time or typed boundary outcomes.

Feature declarations are modeled as typed entities under Namespace, Feature, and FlagDefinition abstractions.

Parse boundary failures are represented as explicit ParseError values wrapped by KonditionalBoundaryFailure.

Failure Mode 1: Key Typos

// String-key pattern
val enabled = flags["new-checkot"] as? Boolean ?: false // typo survives review

// Konditional pattern
val enabled: Boolean = CheckoutFeatures.newCheckout.evaluate(ctx)
// CheckoutFeatures.newCheckot -> compile error

Failure Mode 2: Type Coercion Drift

// String-key pattern
val timeout = (flags["timeout"] as String).toInt()

// Konditional pattern
val timeout: Int = CheckoutFeatures.timeout.evaluate(ctx)

Failure Mode 3: Boolean Explosion

String-key systems often multiply booleans for related behavior. Konditional encourages typed values (enum, structured types) so related states stay coherent.

Failure Mode 4: Inconsistent Rollout Assignment

Deterministic bucketing uses stable identity and salt, so the same context yields stable inclusion decisions over time.

Trade-off

Compile-time safety requires static declarations in source. If your primary requirement is non-code, ad-hoc flag creation by non-developers, you will need internal tooling around this API.

Next Steps

Claim Coverage

Claim IDStatement
CLM-PR01-03AFeature declarations are modeled as typed entities under Namespace and Feature abstractions.
CLM-PR01-03BParse boundary failures are represented with explicit ParseError and KonditionalBoundaryFailure types.