Skip to content

Commit 49cdd42

Browse files
committed
docs(ofrep): say which rule each withholding reaches, after rule six was narrowed
spec@aa2ad24f puts a condition on the rule cited here a commit ago: it applies once a provider is attempting the capability, and decides whether a question is askable rather than whether an answer is owed. Applied to this suite that is not a detail, it is the difference between three right answers and one manufactured failure. @numeric-coercion would have been that failure. All three of its scenarios are askable of this provider and two of them fail, so the rule as first written forced a declaration -- of a capability no requirement defines, from a provider that does not coerce by design. It never reaches rule six now. The Go implementation found the over-reach against its own self-tests; this suite would have been the second one. @large-integers does reach it, and the note says why: nothing here declines to resolve a large integer, so attempting is not in doubt and askability is the only question left. The backend seeds no huge-integer-flag, so the answer is withhold. @disabled-flags reaches neither, and the note now says which rule its argument actually turns on -- the two shapes, not rule six. The evidence is that this provider attempts and fails rather than declining: it has no design position on disabled flags, it parses the response flagd sends for one, and it raises KeyError on a member the protocol types as optional. A provider that declined would have nothing in the path that could be right or wrong, which is exactly what the numeric-coercion entry above looks like. Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
1 parent 88582dc commit 49cdd42

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

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

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,16 @@
143143
# JSON types stay apart end to end, and there is no coercion here to get wrong.
144144
# Same rule, different provider, opposite answer.
145145
#
146+
# It also survives rule six, and spec@aa2ad24f is why. As that rule was first
147+
# written -- declare when at least one scenario gating the tag can be put to the
148+
# provider -- it would have forced a declaration here, since all three scenarios
149+
# are perfectly askable of this provider and two of them fail. The rule now
150+
# opens by saying it applies *once a provider is attempting the capability*, and
151+
# decides whether a question is askable rather than whether an answer is owed.
152+
# Nothing requires numeric coercion, this provider does not attempt it, so the
153+
# question never reaches rule six. The Go implementation found that over-reach
154+
# against its own self-tests; this suite would have been the second casualty.
155+
#
146156
# DISABLED_FLAGS is withheld as well, new at spec@009afe06, and this one is a
147157
# provider defect rather than an architecture. Which is the opposite of what the
148158
# appendix predicts, so it is worth being exact about.
@@ -197,6 +207,18 @@
197207
# identified defect, is explicit that an adoption has none: this suite exists to
198208
# report on a provider, and a skip here is a claim about that provider.
199209
#
210+
# Note which rule that turns on, because spec@aa2ad24f makes the difference
211+
# sharp. It is *not* rule six: that rule decides askability and applies only
212+
# once a provider is attempting the capability, and if attempting were in doubt
213+
# it would not reach the question. It is the two-shapes rule, and the evidence
214+
# says this provider attempts and fails rather than declining -- it has no
215+
# design position on disabled flags at all, it parses the response flagd sends
216+
# for one and raises KeyError on a member the protocol types as optional, which
217+
# breaks on any variant-less response and not only this one. A provider that
218+
# declined by design would look like the numeric-coercion entry above: nothing
219+
# in the code path that could be right or wrong, rather than one index that is
220+
# wrong.
221+
#
200222
# So the next change to this file declares @disabled-flags, accepts four failing
201223
# rows, and records the `data["variant"]` defect as an untracked deviation -- and
202224
# files it, which is what makes the deviation tracked and the failures temporary.
@@ -270,8 +292,11 @@
270292
# LARGE_INTEGERS
271293
# The one withholding in this list that is about the backend rather than the
272294
# provider, and until this pass the one with no reason written down at all.
273-
# Appendix F's sixth declaring rule (spec@4cab0320) is what decides it:
274-
# exactly one scenario carries the tag, it asks for `huge-integer-flag`, and
295+
# Appendix F's sixth declaring rule (spec@4cab0320, narrowed at
296+
# spec@aa2ad24f) is what decides it, and this is a tag that reaches that
297+
# rule: nothing about this provider declines to resolve a large integer, so
298+
# it is attempting the capability and only askability is left in question.
299+
# Exactly one scenario carries the tag, it asks for `huge-integer-flag`, and
275300
# flagd-testbed v3.8.0 seeds no such flag -- so not one of the tag's
276301
# scenarios can be put to this provider, and nothing about the capability
277302
# can be established either way. Contrast VARIANTS above, where seven of

0 commit comments

Comments
 (0)