Skip to content

feat: add resolve operator scenarios - #448

Open
marcozabel wants to merge 6 commits into
open-feature:mainfrom
marcozabel:feat/resolve-operator-scenarios
Open

marcozabel wants to merge 6 commits into
open-feature:mainfrom
marcozabel:feat/resolve-operator-scenarios

Conversation

@marcozabel

@marcozabel marcozabel commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

This PR

Adds scenarios for the terminal resolve operator from the targeting metadata ADR, in gherkin/resolve.feature with flags in flags/resolve-flags.json.

Covered:

  • variant and reason, and a free-form reason
  • rule metadata precedence
  • nested and single-clause if, and fractional buckets
  • boolean variant coercion
  • computed arguments and metadata
  • malformed computed arguments falling back to the default variant
  • a missing variant returning GENERAL
  • a $ref evaluator in an if result

Tags and loading:

  • Every scenario is tagged @resolve. Providers without the operator can exclude them with not @resolve. Metadata scenarios are also tagged @metadata, and fallback scenarios @operator-errors.
  • resolve-flags.json stays out of allFlags.json and is loaded only through the new resolve launchpad config, so providers without the operator still accept the merged file.
  • Misplaced or malformed literal resolve isn't tested, because the targeting schema rejects it (feat: add terminal resolve operator to targeting schema flagd-schemas#238).

Related Issues

Fixes #437
Part of open-feature/flagd#2090

Notes

The published image uses flagd v0.18.2, which doesn't have resolve. The scenarios need open-feature/flagd#2127.

Follow-up Tasks

  • Flag-set metadata precedence isn't covered yet.

How to test

@marcozabel
marcozabel requested a review from a team as a code owner November 11, 2026 12:45
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 69162535-ad39-4d36-84b4-96bc8b23e1ed
Pre-merge checks: Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@marcozabel
marcozabel marked this pull request as draft November 11, 2026 15:06
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
@marcozabel
marcozabel force-pushed the feat/resolve-operator-scenarios branch from 63e18bc to 3687460 Compare November 11, 2026 15:30
@marcozabel
marcozabel marked this pull request as ready for review November 12, 2026 12:04
…e if

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>

@toddbaert toddbaert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Coverage is thorough, on the right track! A few changes below to match the decisions in open-feature/flagd#2127.

Comment thread flags/resolve-flags.json Resolved
Comment thread flags/resolve-flags.json Resolved
Comment thread gherkin/resolve.feature Resolved
Comment thread gherkin/resolve.feature Resolved
Comment thread gherkin/resolve.feature Resolved
Comment thread agents.md Resolved
Comment thread gherkin/resolve.feature Resolved
- drop `?:` flag and scenario
- coerce boolean variants (literal and computed) instead of PARSE_ERROR
- add a computed metadata key case
- remove misplaced / malformed-literal scenarios (schema covers them)
- keep resolve-flags.json out of allFlags.json; load it via a dedicated
  `resolve` launchpad config

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
- use a rule as the fractional bucketing value instead of a literal string
- wrap the evaluator $ref in an if result instead of using it as the whole rule

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Rule metadata overwrites flag metadata, which overwrites flag set
metadata.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
flagSetId and version are reserved for flag set metadata. The schema
rejects them as literal resolve metadata keys, so only computed keys are
covered; a literal key would make the shared flag file invalid.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
marcozabel added a commit to marcozabel/java-sdk-contrib that referenced this pull request Nov 20, 2026
Pins open-feature/flagd-testbed#448 at 91ba87a.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
marcozabel added a commit to marcozabel/java-sdk-contrib that referenced this pull request Nov 20, 2026
…rios

Pins open-feature/flagd-testbed#448 at 952a05f (not pushed yet).

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
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.

feat: add resolve operator scenarios

2 participants