Repository navigation
Commit 38909b1
committed
feat(tck): check every scenario the run collects for a reserved tag
The check landed canonical-only, on the reasoning that only the
specification can expire a reservation -- an adopter's own feature reaching
for a reserved tag is a mistake in that file rather than news about the
specification. That reasoning is sound and it answers the wrong question.
A reserved capability cannot be declared, because TckConfig refuses it, so
the capability gate skips every scenario carrying its tag whichever file the
tag is in. An extension scenario tagged @caching is therefore unclaimable
from the day it is written: it can never run, it can never be claimed, and
the report shows a gap the provider may not have. That is the
unclaimable-capability failure Appendix F describes, and it is the failure
this check exists to surface. It arrives from the adopter's side instead of
from upstream and the consequence is identical, so one check covers both
causes as long as the message names both remedies -- drop the tag from
RESERVED_CAPABILITIES because the specification has given it scenarios, or
rename a tag of your own that reached for a reserved name.
Go and Java check every scenario the run collected. This is Python coming
into line rather than a local judgement: the divergence was put up for a
ruling and the broader rule is what it settled on.
Two things stay as they were and both are Python's alone. The canonical half
is still read off the packaged feature files rather than off the collected
items, because an adopter's selection must not be able to narrow a run past
the specification's half; an extension has no equivalent source, since its
directory is found from the adopter's own test module, so that half comes
from the collection as it does in every other language. And the check still
waits for a canonical scenario to be collected before it looks at anything:
this package is a pytest11 plugin, so the hook fires for every pytest run in
an environment that merely has it installed, and an unrelated test suite has
no business failing over the contents of these feature files. Tags are read
only from scenarios the uri derivation in extensions claims, so a pytest-bdd
suite of the adopter's own sharing the session is left alone too.
The tags are the markers pytest-bdd derives from the parsed Gherkin, which
is what the capability gate itself reads, so the check and the gate cannot
disagree about which scenarios are unclaimable -- and a tag inherited from
the feature or the rule is included, where Scenario.tags would miss it.
Still never the file text: gherkin/events.feature names @caching inside a
Gherkin comment, and a text scan would fail every adoption over a sentence.
Verified against a real collection rather than only the stubbed items. An
adopter suite whose extensions/vendor.feature carries @caching aborts at
collection with exit 4 and that message; renaming the tag collects the same
58 scenarios clean; moving @caching into a Gherkin comment collects clean.
Narrowing the check back to the canonical set fails exactly one test, the
one that covers the widening.
Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>1 parent 6d5eaa1 commit 38909b1
5 files changed
Lines changed: 226 additions & 78 deletions
File tree
- tools/openfeature-tck
- src/openfeature/contrib/tools/tck
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
361 | 369 | | |
362 | 370 | | |
363 | 371 | | |
| |||
690 | 698 | | |
691 | 699 | | |
692 | 700 | | |
693 | | - | |
| 701 | + | |
694 | 702 | | |
695 | 703 | | |
696 | 704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
388 | 391 | | |
389 | 392 | | |
390 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
198 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
199 | 204 | | |
200 | 205 | | |
201 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
88 | 115 | | |
89 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
90 | 126 | | |
91 | 127 | | |
92 | | - | |
| 128 | + | |
93 | 129 | | |
94 | 130 | | |
95 | 131 | | |
96 | 132 | | |
97 | 133 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
103 | 144 | | |
104 | 145 | | |
105 | 146 | | |
106 | | - | |
107 | | - | |
| 147 | + | |
| 148 | + | |
108 | 149 | | |
109 | 150 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
113 | 160 | | |
114 | 161 | | |
115 | 162 | | |
116 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
117 | 167 | | |
118 | 168 | | |
119 | 169 | | |
| |||
0 commit comments