Repository navigation
feat: add PROVIDER_RECONCILING and PROVIDER_CONTEXT_CHANGED events - #338
Conversation
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>
|
Warning Review limit reachedThis 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. View limit details
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 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_RECONCILINGandPROVIDER_CONTEXT_CHANGEDwith 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
Summary
PROVIDER_RECONCILINGandPROVIDER_CONTEXT_CHANGEDtoProviderEvent. Spec v0.9.0 5.1.1 requires all six provider events.What changed
PROVIDER_CONTEXT_CHANGEDsets the provider status to READY, per the event-to-status table in 5.3.5.PROVIDER_RECONCILINGleaves the status unchanged. The RECONCILING status is static-context only (1.7.2.1), and this SDK is dynamic-context.PROVIDER_READY,PROVIDER_ERRORandPROVIDER_STALE. A new CONTEXT_CHANGED handler doesn't fire on registration.🤖 Generated with Claude Code