open-feature / open-feature/flagd-testbed
feat: add ADR-conformant numeric coercion scenarios under @numeric-coercion-v2
Nobody has claimed this yet.
- Dominant language
- Gherkin
- Stars
- 5
- Forks
- 14
- Avg merge
- 3h 17m
- Merged PRs (30d)
- 13
Description
Adds ADR-conformant numeric coercion coverage for the numeric coercion ADR, as a new opt-in suite so providers can adopt it as they migrate (following the opt-in @fractional-v1/@fractional-v2 precedent).
There is currently no numeric-coercion feature in the testbed, so this is purely additive; there is no prior suite to preserve.
- add a new opt-in tag
@numeric-coercionwith scenarios matching the ADR:10.0fetched as Integer resolves to10(lossless coercion)3.14fetched as Integer returnsTYPE_MISMATCH- int variant within safe range fetched as Float widens losslessly
- wide/boundary values (e.g.
9007199254740991) resolved via the canonicalLongaccessor (@long) - int variant exceeding int32 fetched as Integer returns
TYPE_MISMATCH, tagged@int32-bounded(only for languages whose Integer accessor is int32; Go/Python and other int64/wide-Integer languages exclude it) - int variant exceeding int32 fetched as Float succeeds
- add the scenarios to both suites: the provider
gherkin/suite (real flagd container / wire) and the self-containedevaluator/suite - add a
flags/numeric-coercion-flags.json(auto-merged intoallFlags.json) plus the matchingevaluator/flagsfixtures - register
@numeric-coercion,@int32-bounded,@long, and theLongflag-value type token inagents.mdandREADME.md - bump
FLAGD_BASE_IMAGEto the flagd version that ships the contract - cut a new testbed release
Out of scope: load-time rejection of out-of-range values. The safe-integer cap is an ordinary schema validation (a warning in flagd today), not a hard load failure, so there is no "rejected at load" scenario here. The 2^53 - 1 boundary is covered by resolving it correctly via Long; hard-fail-on-out-of-range is a separate future feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the existing opt-in @fractional-v1/@fractional-v2 scenarios in gherkin/ and evaluator/. Add the numeric-coercion scenarios and fixtures in flags/numeric-coercion-flags.json and evaluator/flags, then update agents.md, README.md, FLAGD_BASE_IMAGE, and the release metadata mentioned in the issue. Done means both suites cover the ADR cases and the new tags and Long token are registered.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, release, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100