Commit 1310240
committed
test: document fixture-global counter limitation in flaky test seams
The PR review thread suggested keying flaky_by_index and
flaky_instance_only by id(state) for per-instance counters. Tried
that; broke fixture 021. Root cause: instance-level retry (021)
constructs a fresh subgraph state on each retry, so id(state) resets
per retry attempt — the per-instance counter starts over and retry
exhausts.
True per-instance semantics need an identifier stable across both
node-level retry (state stable, id works) AND instance-level retry
(state changes, id doesn't work). A state-field key would work but
the field name is fixture-specific (item for 020, input for 021).
Reverting to a fixture-global counter and documenting the limitation
in the docstring + an inline comment, so a future fixture exercising
the gap surfaces a real failure rather than silently miscounting.
The existing fixtures (019 collect, 020 node-level retry, 021
instance-level retry) align with the global counter at runtime —
not because the semantics are correct, but because the timing
happens to land the failure on the right call.1 parent 721aaad commit 1310240
1 file changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
226 | 237 | | |
227 | 238 | | |
228 | 239 | | |
| |||
239 | 250 | | |
240 | 251 | | |
241 | 252 | | |
242 | | - | |
| 253 | + | |
| 254 | + | |
243 | 255 | | |
244 | 256 | | |
245 | 257 | | |
| |||
257 | 269 | | |
258 | 270 | | |
259 | 271 | | |
260 | | - | |
261 | | - | |
262 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
263 | 279 | | |
264 | 280 | | |
265 | 281 | | |
| |||
0 commit comments