Skip to content

feat: add PROVIDER_RECONCILING and PROVIDER_CONTEXT_CHANGED events - #338

Merged
josecolella merged 3 commits into
mainfrom
feat/reconciling-context-changed-events
Oct 22, 2026
Merged

josecolella merged 3 commits into
mainfrom
feat/reconciling-context-changed-events

Conversation

@josecolella

Copy link
Copy Markdown
Collaborator

Summary

  • Adds PROVIDER_RECONCILING and PROVIDER_CONTEXT_CHANGED to ProviderEvent. Spec v0.9.0 5.1.1 requires all six provider events.
  • Part of Spec v0.9.0 compliance #300.

What changed

  • Providers can emit both events, and API and client handlers receive them.
  • PROVIDER_CONTEXT_CHANGED sets the provider status to READY, per the event-to-status table in 5.3.5.
  • PROVIDER_RECONCILING leaves the status unchanged. The RECONCILING status is static-context only (1.7.2.1), and this SDK is dynamic-context.
  • Handlers added after the fact (5.3.3) still run immediately only for PROVIDER_READY, PROVIDER_ERROR and PROVIDER_STALE. A new CONTEXT_CHANGED handler doesn't fire on registration.

🤖 Generated with Claude Code

josecolella and others added 3 commits October 22, 2026 13:39
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jose Colella <jose.colella@gusto.com>
PROVIDER_CONTEXT_CHANGED sets the provider status to READY (spec 5.3.5). PROVIDER_RECONCILING leaves it unchanged, since the RECONCILING status is static-context only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jose Colella <jose.colella@gusto.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jose Colella <jose.colella@gusto.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ 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: 9c263587-56c5-4884-bc68-aecc4ebb0fba
📥 Commits

Reviewing files that changed from the base of the PR and between 5605611 and a6b3348.

📒 Files selected for processing: 6
  • lib/open_feature/sdk/provider_event.rb
  • lib/open_feature/sdk/provider_state_registry.rb
  • sig/open_feature/sdk/provider_event.rbs
  • spec/open_feature/sdk/provider_event_spec.rb
  • spec/open_feature/sdk/provider_state_registry_spec.rb
  • spec/specification/events_spec.rb
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.50%. Comparing base (5fbfabc) to head (a6b3348).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #338   +/-   ##
=======================================
  Coverage   99.50%   99.50%           
=======================================
  Files          31       31           
  Lines         808      810    +2     
=======================================
+ Hits          804      806    +2     
  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.

@josecolella
josecolella marked this pull request as ready for review October 22, 2026 22:58
@josecolella
josecolella requested a review from a team as a code owner October 22, 2026 22:58
Copilot AI balanced review requested due to automatic review settings October 22, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused changes fit the existing event-handling design, with no blocking issues identified in static review; tests were not executed.

No open issues 🎉

What changed in this PR

Adds the two missing provider events for OpenFeature spec v0.9.0 compliance, advancing #300 while preserving the Ruby SDK’s dynamic-context behavior.

Changes:

  • Defines PROVIDER_RECONCILING and PROVIDER_CONTEXT_CHANGED with matching type declarations.
  • Maps context changes to READY while leaving status unchanged during reconciliation.
  • Adds tests for event constants, dispatch, and state transitions.
File Description
spec/​specification/​events_spec.rb Updates requirement wording and tests dispatch of both events.
spec/​open_feature/​sdk/​provider_state_registry_spec.rb Tests state behavior for both events.
spec/​open_feature/​sdk/​provider_event_spec.rb Verifies new constants and the complete event set.
sig/​open_feature/​sdk/​provider_event.rbs Declares types for the new constants.
lib/​open_feature/​sdk/​provider_state_registry.rb Maps context changes to READY and documents reconciliation behavior.
lib/​open_feature/​sdk/​provider_event.rb Adds both constants to the supported event set.

Review effort: Balanced

@josecolella josecolella mentioned this pull request Oct 22, 2026
17 tasks done
@josecolella
josecolella merged commit 2b93aa4 into main Oct 22, 2026
28 checks passed
@josecolella
josecolella deleted the feat/reconciling-context-changed-events branch October 22, 2026 23:08
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