Commit 5b58d5f
Address local-review findings + fix test_practitioner.py mock fixture
Found via local pre-PR validation (wider polymorphic-consumer pytest
sweep + adversarial probe + local AI review).
1. Fix `mock_continuous_results` fixture in tests/test_practitioner.py.
The fixture was setting `r.overall_se = 0.1` on a fresh
`ContinuousDiDResults.__new__()` mock. Pre-PR this silently created a
junk attribute (canonical SE on ContinuousDiDResults is
`overall_att_se`); post-PR `overall_se` is a read-only @Property alias
added by this PR, so the assignment raised `AttributeError: can't set
attribute`. Changed to assign the canonical `overall_att_se` field.
`_handle_continuous` in practitioner.py never reads the SE field
anyway — only `_check_nan_att(results)` reads `att`/`overall_att`.
2. Lock read-only alias semantics with a regression test
(`test_aliases_are_read_only` parametrized over Pattern B / C / D)
so future contributors who write similar fixtures fail loudly via
this test rather than via a surprise AttributeError in another suite.
3. One-sentence REGISTRY.md note that aliases are @Property descriptors
and therefore do NOT appear in `dataclasses.fields()` or
`dataclasses.asdict()` output, and that assignment raises
AttributeError — so serializers and field-walkers continue to see
only the canonical field set.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d987f9e commit 5b58d5f
3 files changed
Lines changed: 53 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
261 | 309 | | |
262 | 310 | | |
263 | 311 | | |
| |||
0 commit comments