Skip to content

fix(openfeature): isolate malformed flag configuration - #12186

Draft
leoromanovsky wants to merge 2 commits into
masterfrom
agent/isolate-malformed-flags
Draft

fix(openfeature): isolate malformed flag configuration#12186
leoromanovsky wants to merge 2 commits into
masterfrom
agent/isolate-malformed-flags

Conversation

@leoromanovsky

Copy link
Copy Markdown
Contributor

Motivation

A malformed flag in UFC ingestion must not prevent valid siblings from being evaluated, and rejected keys must produce a parse error instead of looking absent.

Changes

  • bump ffe-system-test-data to ea8b5cc5ce335109f11f3efbc5fd608f98a3ca54
  • parse and validate flags independently while retaining rejected keys
  • return the caller default with ERROR/PARSE_ERROR for malformed flags
  • preserve FLAG_NOT_FOUND for absent keys
  • add canonical, refresh-state, validation, and SemVer coverage

Decisions

  • replace active and rejected state atomically on refresh
  • ignore SemVer build metadata for ordering
  • validate malformed variants, operands, shards, regexes, and SemVer comparands at ingestion
  • keep the separate regex-fixture proposal in ffe-system-test-data#21 out of scope

Validation

  • canonical fixture suite: 182/182 passed
  • DDEvaluatorTest: 311/311 passed
  • RemoteConfigServiceImplTest: 31/31 passed
  • SemanticVersionTest: 3/3 passed
  • Spotless checks for API, bootstrap, and library modules
  • git diff --check

Copilot AI 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.

Pull request overview

Isolates malformed OpenFeature flags so valid siblings remain usable while rejected keys return parse errors.

Changes:

  • Tracks rejected flags per configuration refresh.
  • Adds UFC validation, SemVer operators, and corrected assignment reasons.
  • Expands canonical, malformed-input, refresh, and SemVer tests.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
feature-flagging-api/build.gradle.kts Adds parser test dependency.
DDEvaluator.java Handles rejected flags and SemVer evaluation.
DDEvaluatorTest.java Adds refresh-state and canonical parser coverage.
ConditionOperator.java Adds SemVer operators.
FlagMap.java Stores rejected flag keys.
FlagValidator.java Validates UFC flag structures and operands.
SemanticVersion.java Implements SemVer parsing and ordering.
SemanticVersionTest.java Tests SemVer precedence and limits.
UniversalFlagConfigParser.java Independently parses and rejects malformed flags.
RemoteConfigServiceImplTest.java Verifies malformed keys are retained as rejected.
ffe-system-test-data Updates canonical fixture revision.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +138 to +139
case INTEGER:
return value instanceof Number && ((Number) value).doubleValue() % 1 == 0;
@datadog-official

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.84 s 14.75 s [-0.1%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 13.70 s 13.74 s [-1.0%; +0.4%] (no difference)
startup:petclinic:appsec:Agent 17.47 s 17.34 s [-0.1%; +1.6%] (no difference)
startup:petclinic:iast:Agent 17.47 s 17.53 s [-1.2%; +0.4%] (no difference)
startup:petclinic:profiling:Agent 17.54 s 17.27 s [+0.3%; +2.9%] (maybe worse)
startup:petclinic:sca:Agent 17.56 s 17.14 s [+1.3%; +3.6%] (significantly worse)
startup:petclinic:tracing:Agent 16.11 s 16.59 s [-7.1%; +1.4%] (no difference)

Commit: 752e1d2f · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

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