Skip to content

Commit 8a0a356

Browse files
committed
test(ofrep): account for @reinitialization, and drop two stale claims
spec@fc99d5ac gates "A provider that was shut down can be initialized again" behind a new @reinitialization tag. This adoption withholds it, and the "Not declared, and why" block now says so rather than leaving the newest capability the only one without an entry. Reuse would in fact work here -- a stateless provider holding only a Session has nothing to release and nothing to rebuild, and `shutdown` is inherited and does nothing -- but the scenario cannot be reached to demonstrate it. It lives in lifecycle.feature, so it inherits @lifecycle at feature level, and the gate skips a scenario when any capability gating it is undeclared. With LIFECYCLE withheld, declaring this would leave the scenario skipped on @lifecycle and the claim unexamined. Requirement 2.5.2 makes reuse permitted rather than required, so withholding needs no KnownDeviation. The LIFECYCLE entry also carried two claims that the restacking has since falsified: that the capability was "not in the Capability enum on this branch yet", and that lifecycle.feature was "gated on @events at feature level on this branch". Both were true when written, above a base that did not yet have the split; this branch now sits above the commit that added it, so the enum has LIFECYCLE and the feature carries @lifecycle. The reason for withholding is unchanged -- `initialize` is inherited and does nothing, so initialisation has no outcome to observe -- and only the description of the surroundings is corrected. Conformance is unchanged at the new pin: 27 passed, 3 failed, 9 skipped, 1 xfailed over the 40 canonical scenarios, the nine skips being three @unavailable, two @events, two @lifecycle, one @large-integers and one @reinitialization. Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
1 parent 2454039 commit 8a0a356

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

‎providers/openfeature-provider-ofrep/tests/tck/test_ofrep_conformance.py‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,13 @@
6464
# rate-limit timestamp, and nothing else survives between evaluations.
6565
#
6666
# LIFECYCLE
67-
# Not in the Capability enum on this branch yet (it lands with
68-
# feat/provider-tck), and it would not be declared once it does.
6967
# OFREPProvider does not override `initialize`, so it inherits
7068
# AbstractProvider's, which is `pass` (python-sdk
7169
# openfeature/provider/__init__.py:138-139). Nothing contacts the backend
7270
# before the first evaluation, so initialisation has no outcome to observe.
73-
# lifecycle.feature is gated on @events at feature level on this branch and
74-
# skips for that reason; when it is retagged to @lifecycle it must keep
75-
# skipping, for this one.
71+
# lifecycle.feature carries @lifecycle at feature level and skips as a
72+
# whole, which is the intended outcome: it was gated on @events before the
73+
# capability was split out, and the retag had to keep it skipping here.
7674
#
7775
# EVENTS
7876
# The provider never emits. It extends AbstractProvider, so it inherits
@@ -110,6 +108,23 @@
110108
# rejects the capability without a `new_unavailable_provider`, and none is
111109
# supplied here for the same reason.
112110
#
111+
# REINITIALIZATION
112+
# New at spec@fc99d5ac, which gated the scenario "A provider that was shut
113+
# down can be initialized again" that had been untagged before it.
114+
# Requirement 2.5.2 says a provider SHOULD revert to its uninitialized
115+
# state and that "some providers MAY allow reinitialization", so reuse is
116+
# permitted rather than required and withholding needs no KnownDeviation.
117+
#
118+
# Reuse would in fact work here -- a stateless provider holding only a
119+
# Session has nothing to release and nothing to rebuild, and `shutdown` is
120+
# inherited and does nothing either -- but the scenario cannot be reached to
121+
# demonstrate it. It lives in lifecycle.feature, so it inherits @lifecycle
122+
# at feature level, and the gate skips a scenario when any capability
123+
# gating it is undeclared. With LIFECYCLE withheld above, declaring this
124+
# would leave the scenario skipped on @lifecycle and the claim unexamined:
125+
# the same declare-what-nothing-exercises error the reserved tags below are
126+
# kept out for.
127+
#
113128
# TARGETING, CACHING
114129
# Reserved in the Capability enum; no scenario carries either tag. Declaring
115130
# a capability nothing exercises would be a claim with no evidence behind it.

0 commit comments

Comments
 (0)