Skip to content

feat: Overload client functions - #129

Merged
NeaguGeorgiana23 merged 39 commits into
mainfrom
overload_client_functions
Aug 12, 2026
Merged

feat: Overload client functions#129
NeaguGeorgiana23 merged 39 commits into
mainfrom
overload_client_functions

Conversation

@NeaguGeorgiana23

Copy link
Copy Markdown
Contributor

This PR

  • Adds EvaluationOptions overloads for all typed flag evaluation methods (GetBooleanValue, GetStringValue, GetIntegerValue, GetDoubleValue, GetObjectValue) in the Features interface and ClientAPI implementation per OpenFeature Specification Requirements 1.3.1.1 and 1.5.1.
  • Supports both (flag_key, default_value, options) and (flag_key, default_value, context, options) call signatures.
  • Updates ClientAPI::EvaluateFlag and private typed evaluation helpers to accept and propagate std::optional<EvaluationOptions>.
  • Adds :evaluation_options dependency to the :features library target in openfeature/BUILD.
  • Adds unit tests in test/client_api_test.cpp verifying each typed evaluation method with EvaluationOptions and combined EvaluationContext + EvaluationOptions.

Related Issues

Fixes#128

Notes

  • These overloads enable passing invocation-specific hooks (options.hooks) and metadata hints (options.hook_hints) to individual evaluation calls.

Follow-up Tasks

  • Implement the full hook execution lifecycle in ClientAPI::EvaluateFlag to execute invocation-level hooks and propagate HookHints.
  • Add detailed flag evaluation methods (Get*Details) returning `Flag

NeaguGeorgiana23and others added 30 commits July 7, 2026 13:19
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <115723925+NeaguGeorgiana23@users.noreply.github.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
@NeaguGeorgiana23
NeaguGeorgiana23 requested review from a team as code ownersAugust 10, 2026 22:58
@coderabbitai

coderabbitaiBot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 52fb1968-38c0-44aa-ad03-2de2e8cb052b

📥 Commits

Reviewing files that changed from the base of the PR and between 3f148a2 and 333f380.

📒 Files selected for processing (1)
  • openfeature/client_api.h
💤 Files with no reviewable changes (1)
  • openfeature/client_api.h

📝 Walkthrough

Walkthrough

EvaluationOptions overloads were added to Features and ClientAPI for all supported flag types. Client evaluation now forwards options through the shared pipeline. Tests cover option-only and context-plus-options calls.

Changes

EvaluationOptions evaluation support

Layer / File(s)Summary
EvaluationOptions API contracts
openfeature/features.h, openfeature/client_api.h
The public interfaces add evaluation overloads for boolean, string, integer, double, and object values.
Option propagation through evaluation
openfeature/client_api.cpp, openfeature/BUILD
Client getters and typed evaluators forward options to EvaluateFlag. The Bazel target adds the required dependency.
Overload coverage tests
test/client_api_test.cpp
Tests cover option-only and context-plus-options calls for every supported flag type.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Features
participant ClientAPI
participant EvaluateFlag
participant ProviderCallback
Features->>ClientAPI: request flag value with EvaluationOptions
ClientAPI->>EvaluateFlag: pass context and options
EvaluateFlag->>ProviderCallback: dispatch typed evaluation with options
ProviderCallback-->>ClientAPI: return evaluation result
Loading

Possibly related PRs

Suggested reviewers:m-olko

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 66.67% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly identifies the primary change: adding overloads to client functions.
Description check✅ PassedThe description directly explains the EvaluationOptions overloads, propagation changes, dependency update, and tests.
Linked Issues check✅ PassedThe changes implement issue #128 by adding EvaluationOptions overloads and propagating options through typed evaluations.
Out of Scope Changes check✅ PassedAll code changes support the stated EvaluationOptions objective; the follow-up tasks are documented but not included.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <115723925+NeaguGeorgiana23@users.noreply.github.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openfeature/client_api.h`:
- Around line 102-109: Remove one duplicate declaration set for AddHooks,
AddHook, and GetHooks in ClientAPI, retaining exactly one declaration of each
method with its existing signatures and override specifiers.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 72258ec3-7646-44db-9ace-43f58c46c062

📥 Commits

Reviewing files that changed from the base of the PR and between 72d4c91 and 3f148a2.

📒 Files selected for processing (5)
  • openfeature/BUILD
  • openfeature/client_api.cpp
  • openfeature/client_api.h
  • openfeature/features.h
  • test/client_api_test.cpp

Comment threadopenfeature/client_api.h
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
@NeaguGeorgiana23
NeaguGeorgiana23 merged commit 3a1c4d4 into mainAug 12, 2026
5 checks passed
Sign up for freeto 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.

Overload functions to add support for EvaluationOptions

2 participants

@NeaguGeorgiana23@m-olko