Bug Description
flipt validate rejects valid feature flag configurations with two distinct issues in the CUE schema at [core/validation/flipt.cue](https://github.com/flipt-io/flipt/blob/v2/core/validation/flipt.cue):
-
BOOLEAN_FLAG_TYPE with rollouts fails validation — Boolean flags that include rollouts with a threshold trigger a type conflict error, even though the Flipt runtime correctly processes these configurations.
-
Null description fields rejected — Flags, variants, and segments with description: null (or implicitly null from YAML) fail validation because the schema defines description?: string which doesn't accept null.
These configurations work correctly at runtime — only the static validator rejects them.
Version Info
Tested on v2.1.3 and v2.6.0 — both produce the same errors.
To Reproduce
Create a features.yaml file:
version: "1.5"
namespace:
key: my-service
name: my-service
flags:
- key: my-boolean-flag
name: my-boolean-flag
type: BOOLEAN_FLAG_TYPE
enabled: true
rollouts:
- threshold:
percentage: 100
value: true
Run:
Actual Output
2026-02-11T20:05:12Z INFO no configuration file found, using defaults
Validation failed!
- Message : flags.0: 2 errors in empty disjunction:
File : features.yaml
Line : 0
- Message : flags.0.type: conflicting values "BOOLEAN_FLAG_TYPE" and "VARIANT_FLAG_TYPE"
File : features.yaml
Line : 8
For the null description issue, a flag or segment with description: null produces:
- Message : flags.0.variants.0.description: conflicting values null and string (mismatched types null and string)
- Message : segments.0.description: conflicting values null and string (mismatched types null and string)
Expected Output
Validation should pass. These are valid Flipt configurations that the runtime accepts and processes correctly.
Analysis
Looking at the CUE schema in [core/validation/flipt.cue](https://github.com/flipt-io/flipt/blob/v2/core/validation/flipt.cue):
Issue 1: Boolean flag disjunction
#Flag: {
// ...
variants: [...#Variant]
rules: [...#Rule]
if version == "1.1" || ... {
type: "BOOLEAN_FLAG_TYPE" | *"VARIANT_FLAG_TYPE"
#FlagBoolean | *{}
}
}
The disjunction #FlagBoolean | *{} doesn't properly discriminate when a BOOLEAN_FLAG_TYPE flag has rollouts. CUE attempts to unify against both branches of the disjunction and reports the type conflict when neither branch cleanly matches. The variants: [...#Variant] field on #Flag (which defaults to an empty list) seems to interfere with the #FlagBoolean branch resolution.
Issue 2: Null descriptions
#Flag: {
description?: string
// ...
}
#Variant: {
description?: string
// ...
}
#Segment: {
description?: string
// ...
}
description?: string makes the field optional but doesn't permit null as a value. In YAML, omitting a field and setting it to null are often treated equivalently by parsers, but CUE treats null and absent differently. This should be:
description?: string | null
Environment
- OS: Ubuntu 22.04 (CircleCI
cimg/base:current-22.04)
- Flipt CLI installed via:
curl -fsSL https://get.flipt.io/v2 | sh -s -- v2.6.0
- Using
flipt validate in CI/CD pipeline
Additional Context
This is blocking our CI/CD pipeline — all PRs to our feature flags config repository fail the flipt validate step. The Flipt runtime handles these configurations correctly; only the static validator rejects them.
We've confirmed this reproduces on both v2.1.3 and v2.6.0, so it doesn't appear to have been addressed in recent releases.
Bug Description
flipt validaterejects valid feature flag configurations with two distinct issues in the CUE schema at[core/validation/flipt.cue](https://github.com/flipt-io/flipt/blob/v2/core/validation/flipt.cue):BOOLEAN_FLAG_TYPE with rollouts fails validation — Boolean flags that include
rolloutswith athresholdtrigger a type conflict error, even though the Flipt runtime correctly processes these configurations.Null
descriptionfields rejected — Flags, variants, and segments withdescription: null(or implicitly null from YAML) fail validation because the schema definesdescription?: stringwhich doesn't acceptnull.These configurations work correctly at runtime — only the static validator rejects them.
Version Info
Tested on v2.1.3 and v2.6.0 — both produce the same errors.
To Reproduce
Create a
features.yamlfile:Run:
Actual Output
For the null description issue, a flag or segment with
description: nullproduces:Expected Output
Validation should pass. These are valid Flipt configurations that the runtime accepts and processes correctly.
Analysis
Looking at the CUE schema in
[core/validation/flipt.cue](https://github.com/flipt-io/flipt/blob/v2/core/validation/flipt.cue):Issue 1: Boolean flag disjunction
The disjunction
#FlagBoolean | *{}doesn't properly discriminate when aBOOLEAN_FLAG_TYPEflag hasrollouts. CUE attempts to unify against both branches of the disjunction and reports the type conflict when neither branch cleanly matches. Thevariants: [...#Variant]field on#Flag(which defaults to an empty list) seems to interfere with the#FlagBooleanbranch resolution.Issue 2: Null descriptions
description?: stringmakes the field optional but doesn't permitnullas a value. In YAML, omitting a field and setting it tonullare often treated equivalently by parsers, but CUE treatsnulland absent differently. This should be:Environment
cimg/base:current-22.04)curl -fsSL https://get.flipt.io/v2 | sh -s -- v2.6.0flipt validatein CI/CD pipelineAdditional Context
This is blocking our CI/CD pipeline — all PRs to our feature flags config repository fail the
flipt validatestep. The Flipt runtime handles these configurations correctly; only the static validator rejects them.We've confirmed this reproduces on both v2.1.3 and v2.6.0, so it doesn't appear to have been addressed in recent releases.