You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Define numeric coercion behavior across flagd implementations #1978
flagd's evaluators don't agree on what should happen when a numeric flag is fetched via a different numeric accessor than its parsed type, or when a value doesn't fit the requested type.
A few examples I've observed:
A 3.14 variant fetched as Integer returns 3 in the Go and Java implementations (silent truncation), but returns TYPE_MISMATCH in Python and .NET.
A 9000000000 variant fetched as Integer returns 410065408 over the flagd-java RPC path (silent int32 overflow on the wire), TYPE_MISMATCH in flagd-java in-process, and the correct value in Python and Go (within int64).
The same 9000000000 variant fetched as Float succeeds in Go, Python, and .NET, but returns TYPE_MISMATCH in flagd-java in-process.
A 10.0 variant fetched as Integer returns 10 in Go and Java, TYPE_MISMATCH in Python and .NET.
These behaviors are reachable today with simple flag definitions; users moving between SDKs hit them.
I'd like us to define a single contract for numeric coercion that all flagd implementations follow, and update the testbed to enforce it. I'll open a follow-up ADR proposing a specific contract; this issue is just to capture the problem.
Activity
docs: add numeric coercion proposal (open-feature#1979)