Skip to content

fix: Log a non-string kind attribute as an error - #76

Merged
kinyoklion merged 1 commit into
mainfrom
devin/1793922419-kind-error-log
Nov 6, 2026
Merged

kinyoklion merged 1 commit into
mainfrom
devin/1793922419-kind-error-log

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

OpenFeature provider spec (OFP) Requirement 2.1.4.1 in launchdarkly/sdk-specs.

Describe the solution you've provided

When an EvaluationContext has a kind attribute that is not a string, the provider ignores it and builds a user context. OFP 2.1.4.1 says the provider MUST log an error in that case, and the README already says "An error message will be logged". The converter logged it as a warning, so this changes logger.warning to logger.error and the provider test now asserts the log level.

Describe alternatives you've considered

None.

Additional context

The conversion behavior is unchanged; only the log level is different. Found during the weekly OpenFeature provider audit.

Link to Devin session: https://app.devin.ai/sessions/f7bc946afe8c41a28cf7f3f497fc8b9d
Open in Devin Desktop: https://app.devin.ai/desktop/session/f7bc946afe8c41a28cf7f3f497fc8b9d?variant=devin

SDK-3496


Note

Overview
Aligns logging with OpenFeature provider spec 2.1.4.1 and the README: when EvaluationContext has a non-string kind, the converter still discards it and builds a user context, but now emits logger.error instead of logger.warning.

The provider integration test test_logger_changes_should_cascade_to_evaluation_converter now asserts the captured log record is at ERROR level (message unchanged).

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

Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 5, 2026 23:50
@devin-ai-integration
devin-ai-integration Bot requested a review from a team as a code owner November 5, 2026 23:50
@kinyoklion
kinyoklion merged commit 3a48713 into main Nov 6, 2026
19 checks passed
@kinyoklion
kinyoklion deleted the devin/1793922419-kind-error-log branch November 6, 2026 16:50
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.

2 participants