Skip to content

feat(core): pass bound domain to provider init and enforce domain-scoped binding#298

Draft
jonathannorris wants to merge 3 commits into
mainfrom
feat/domain-scoped-provider-init
Draft

feat(core): pass bound domain to provider init and enforce domain-scoped binding#298
jonathannorris wants to merge 3 commits into
mainfrom
feat/domain-scoped-provider-init

Conversation

@jonathannorris

Copy link
Copy Markdown
Member

Summary

  • Add optional domain: keyword to provider init and pass the bound domain from the provider mutator (spec 1.1.2.2, 2.4.1)
  • Add domain_scoped? provider declaration and reject binding a domain-scoped instance to more than one domain (spec 2.4.3, 1.1.8.1)
  • Add conformance tests, including legacy single-argument init backward compatibility

Motivation

Unblocks OFREP static-context providers that need the bound domain at init time to scope persisted cache keys per open-feature/spec#393 and protocol ADR 0009.

Parallel implementations: js-sdk#1433, java-sdk#1982, python-sdk#616.

Notes

  • Non-breaking: domain: is an optional keyword on init
  • Non-domain-scoped providers retain existing behavior (single instance can back multiple domains; init runs once)
  • Legacy providers that only implement init(evaluation_context) remain compatible; the registry inspects the init signature on the class and omits domain: when it is not accepted

Test plan

  • bundle exec rspec (431 examples)
  • bundle exec steep check
  • bundle exec standardrb

…ped binding

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f0aea4eb-4750-4997-b4d5-f3853a27b0cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (0e986fd) to head (fc504e7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #298      +/-   ##
==========================================
+ Coverage   99.50%   99.52%   +0.02%     
==========================================
  Files          31       31              
  Lines         808      851      +43     
==========================================
+ Hits          804      847      +43     
  Misses          4        4              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Jonathan Norris <jonathan.norris@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.

1 participant