Skip to content

Client API#53

Merged
NeaguGeorgiana23 merged 4 commits into
mainfrom
feature/split-2-client
Jan 29, 2026
Merged

Client API#53
NeaguGeorgiana23 merged 4 commits into
mainfrom
feature/split-2-client

Conversation

@NeaguGeorgiana23

Copy link
Copy Markdown
Contributor

This PR

  • Implements ClientAPI class which is the concrete implementation of Client.
  • Implements Boolean flag evaluation logic.

Related Issues

Fixes #34

Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
@NeaguGeorgiana23 NeaguGeorgiana23 requested review from a team as code owners January 27, 2026 12:43
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @NeaguGeorgiana23, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly advances the OpenFeature C++ SDK by introducing foundational client-side feature flag evaluation capabilities. It establishes the ClientAPI for interacting with feature flags and a GlobalContextManager for managing application-wide evaluation contexts. The changes provide the initial structure for evaluating boolean flags and ensure a robust, thread-safe mechanism for context handling, setting the stage for more comprehensive feature flag support.

Highlights

  • ClientAPI Implementation: Introduced ClientAPI as the concrete implementation of the Client interface, providing core feature flag evaluation capabilities.
  • Boolean Flag Evaluation: Implemented the logic for evaluating boolean feature flags, including handling default values and provider status.
  • Global Context Management: Added GlobalContextManager to handle a global EvaluationContext, ensuring thread-safe access and modification.
  • Build System Updates: Updated Bazel build files to incorporate the new ClientAPI and GlobalContextManager components and their respective tests.
  • Comprehensive Testing: Included new unit tests for both ClientAPI and GlobalContextManager, covering functionality, context handling, and thread safety.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@NeaguGeorgiana23 NeaguGeorgiana23 requested review from alichka06 and oxddr and removed request for a team January 27, 2026 12:45

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces the ClientAPI as a concrete implementation of the Client interface, and adds the GlobalContextManager for handling global evaluation context. The changes include the implementation for boolean flag evaluation and corresponding build file updates and tests.

My review has identified a few issues:

  • The context merging logic in ClientAPI is incomplete and does not adhere to the OpenFeature specification as it ignores the global context.
  • The GlobalContextManager implementation has a missing header include which could lead to build failures on some platforms.
  • A test file includes a main function which will conflict with the gtest_main library used in the build, causing a linker error.

Details and suggestions for these points are in the specific comments.

Comment thread test/global_context_manager_test.cpp
Comment on lines +61 to +69
EvaluationContext ClientAPI::MergeContexts(
const std::optional<EvaluationContext>& invocation_ctx) {
// TODO: Add context merging logic after EvaluationContext is implemented.

if (invocation_ctx) {
return *invocation_ctx;
}
return GetEvaluationContext();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The current implementation of MergeContexts doesn't follow the OpenFeature specification for context merging. It should merge contexts from the invocation, client, and API (global) levels. This implementation only considers the invocation and client contexts, ignoring the global context available via GlobalContextManager. While EvaluationContext is not fully implemented, the logic here should at least be structured to reflect the specified merging hierarchy (invocation > client > global) as a placeholder.

Comment thread openfeature/global_context_manager.cpp
@NeaguGeorgiana23 NeaguGeorgiana23 changed the title Feature/split 2 client Client API Jan 27, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: NeaguGeorgiana23 <115723925+NeaguGeorgiana23@users.noreply.github.com>

@oxddr oxddr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, but let's have #52 merged before I approve this one.

@oxddr oxddr mentioned this pull request Jan 27, 2026
Signed-off-by: NeaguGeorgiana23 <115723925+NeaguGeorgiana23@users.noreply.github.com>
@NeaguGeorgiana23 NeaguGeorgiana23 merged commit aedc8d9 into main Jan 29, 2026
2 checks passed
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.

Implement Client API logic

4 participants