Skip to content

feat(flagd-core): update fractional operator to CBOR encoding (v3) - #415

Draft
m-olko wants to merge 1 commit into
open-feature:mainfrom
m-olko:feat/cbor-fractional-core
Draft

feat(flagd-core): update fractional operator to CBOR encoding (v3)#415
m-olko wants to merge 1 commit into
open-feature:mainfrom
m-olko:feat/cbor-fractional-core

Conversation

@m-olko

@m-olko m-olko commented Sep 3, 2026

Copy link
Copy Markdown

This PR

Update fractional bucketing in openfeature-flagd-core to use canonical CBOR encoding and unsigned 32-bit MurmurHash3 per the latest flagd specification.

  • Implement number normalization for float/int consistency per specification

  • Support non-string targeting keys and null bucketing keys returning None

  • Use [flagKey, targetingKey] CBOR array for shorthand bucketing syntax

  • Update flagd-testbed submodule to v3.10.1 and select @fractional-v3 tests

  • Add unit tests for null handling, zero equivalence, float equivalence, and ordering

Related Issues

Fixes #324

Update fractional bucketing in openfeature-flagd-core to use canonical CBOR encoding and unsigned 32-bit MurmurHash3 per the latest flagd specification.

- Implement number normalization for float/int consistency per specification

- Support non-string targeting keys and null bucketing keys returning None

- Use [flagKey, targetingKey] CBOR array for shorthand bucketing syntax

- Update flagd-testbed submodule to v3.10.1 and select @fractional-v3 tests

- Add unit tests for null handling, zero equivalence, float equivalence, and ordering

Signed-off-by: Marcin Olko <molko@google.com>
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.57%. Comparing base (92c5f49) to head (6d6c3f2).

Files with missing lines Patch % Lines
...e/contrib/tools/flagd/core/targeting/custom_ops.py 89.28% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #415      +/-   ##
==========================================
- Coverage   95.64%   93.57%   -2.08%     
==========================================
  Files          24       31       +7     
  Lines        1057     1089      +32     
==========================================
+ Hits         1011     1019       +8     
- Misses         46       70      +24     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flagd] [FEATURE] Harden Hashing Consistency And Add Support For Non-string Attributes in Fractional Evaluation

3 participants