Skip to content

Add Prime feature flag evaluation client#574

Open
d42me wants to merge 1 commit intomainfrom
feature/platform-feature-flags
Open

Add Prime feature flag evaluation client#574
d42me wants to merge 1 commit intomainfrom
feature/platform-feature-flags

Conversation

@d42me
Copy link
Copy Markdown
Contributor

@d42me d42me commented Apr 28, 2026

Adds a Prime CLI feature flag client that evaluates defaults via the platform feature-flags endpoint with CLI version and team context, falling back to defaults when evaluation is unavailable.


Note

Low Risk
Low risk: adds a new optional API call with defensive validation and a default fallback path, plus unit tests; no existing flows are modified beyond new exports.

Overview
Adds prime_cli.feature_flags with FeatureFlagsClient.evaluate() to fetch evaluated flag values from /feature-flags/evaluate, sending cli_version and optional team_id, and falling back per-key to supplied defaults when the API omits values.

Exposes FeatureFlagsClient, evaluate_feature_flags, and is_feature_enabled from prime_cli.__init__, and adds unit tests covering request payload construction, empty-default short-circuiting, API failure fallback, and strict boolean handling in is_feature_enabled.

Reviewed by Cursor Bugbot for commit 9f24c73. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

1 participant