Commit e977da4
test(auto-eval): strengthen test_strict_zero_division_safe with mixed case
Address review comment #7 (Minor) on PR #764 Sub-project A. The original
zero-division test only asserted ``ef_cqs_strict == 0.0`` in an all-
unverified cohort, which would pass even if the strict denominator math
were broken (numerator is also 0 in that state). That's necessary but
insufficient coverage.
Strengthened to two cases within the same test:
Case A (unchanged intent) — all-unverified degenerate state:
Guards ef_cqs AND ef_cqs_strict both return 0.0 without raising.
Case B (new) — 1 passing + 1 explained_variance + 1 unverified:
effective_total = 3 - 0 - 1 - 1 = 1 → lenient ef_cqs = 1/1 = 1.0
strict_total = 3 - 0 - 1 = 2 → strict ef_cqs_strict = 1/2 = 0.5
Case B would fail loudly if the strict denominator forgot to subtract
unverified_count, or accidentally subtracted explained_variance_count
(turning it into the lenient formula). The two cases together pin the
full contract: guard correctness + arithmetic correctness.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2501f1e commit e977da4
1 file changed
+39
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | | - | |
361 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
362 | 381 | | |
363 | 382 | | |
364 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
365 | 387 | | |
366 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
367 | 401 | | |
368 | 402 | | |
369 | 403 | | |
| |||
0 commit comments