Adopt spec #385 Phase 1: reframe provider-status citations, audit provider events - #342
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of adopting OpenFeature spec v0.9.0's provider state ownership via events (spec#385). No runtime behaviour changes — comments, docs and tests only.
Why the citations were stale
v0.9.0 removed requirements
1.7.6/1.7.7, which said a client MUST short-circuit evaluation when the provider is NOT_READY/FATAL, and renumbered the equivalent gherkin scenarios to@spec-2.2.7(+@spec-1.4.10).This library still short-circuits, and that is unchanged. What changes is the justification: it is now deliberate library policy, permitted rather than required. Removing the gate would alter the published 1.0.0 error contract (typed
ProviderNotReady/ProviderFatal, with transaction overrides and cached evaluations deliberately bypassing it) for no spec gain, since the gherkin asserts the same observable outcomes either way. Evaluations inErrorstill proceed — a transient blip must not become an outage.Every stale citation across
core/,testkit/,extras/anddocs/is reframed. Two references remain in the conformance README, deliberately: they record the pre-rename numbering so a future re-sync can trace it, and a note says so.CHANGELOG.mdmentions are release history and stay as written.Provider event audit
docs/providers.mdgains a per-provider table of lifecycle-event emission, audited against the spec'sappendix-e-migrations.md. The audit corrected three things the issue's own draft table got wrong:CircuitBreakerProvideremits its ownREADY/STALEon breaker transitions, not just forwarding;CachingReasonProviderextendsEventProviderbut never attaches, so it drops the delegate's events (same limitation asDeferredProvider) — the draft said it forwarded them;HoconProvider,EnvVarProviderandIntegerWideningLongProviderwere missing from the table entirely.Why provider-side emission is deferred
No bundled provider emits init-time events, deliberately. Until the Java SDK ships the opt-in marker it keeps synthesizing them, so a provider emitting its own would duplicate. The spec calls such duplicates "expected legacy behavior" — but that concerns the SDK's derived status, and it does not hold here. Two new characterization tests in
ProviderStatusBridgeSpecpin the asymmetry:READY(one transition);So emitting early would surface duplicate
PROVIDER_READYin user code — a visible regression. If Phase 2 flips the second test to observe1, that is the deliberate change, and the test makes it impossible to miss. Phase 2 is filed as #340 (blocked on java-sdk), and four watch-point comments in the code point at it.Verification
scalafmtCheckAll, core 509 tests, testkit 199 tests,conformance/test113/113,conformanceZioBdd/test113/113,+mimaReportBinaryIssues— all green. A repo-wide grep for the removed requirement numbers returns only the intended survivors.Closes #332