Commit 8d357b6
Address CI AI review round 4: narrow Phase 1b guards, strict boundary
Reviewer correctly flagged that the 1%-of-median rule is a Phase 2
design="auto" heuristic, not Phase 1b. Backed off that over-reach.
P1 #1: Removed the min(d)/median(d) < 0.01 check. The mass-point
guard now applies uniformly (whenever d.min() > 0 and modal fraction
at d.min() > 2%) and does not gate on boundary. This still catches
the original concern (silently routing mass-point data through the
nonparametric branch) without rejecting valid Design 1' samples like
Beta(2,2) where d.min() is strictly positive but small.
P1 #2: Tightened boundary validation. The wrapper now accepts only
boundary ~ 0 (Design 1') or boundary ~ d.min() (Design 1 continuous-
near-d_lower) within float tolerance. Off-support values -- including
the previously-allowed "boundary < d.min()" path -- are rejected with
a targeted error message.
P3: Added a public-wrapper duplicate-support regression that drives a
rank-deficient X'X through the full selector stack (boundary =
d.min(), unique minimum, only 4 distinct d values) and asserts a
specific "qrXXinv" ValueError, not LinAlgError.
Test updates:
- Removed test_boundary_zero_with_positive_d_min_rejected: the case
it modeled is now accepted (no mass point).
- Added test_boundary_zero_thin_boundary_density_accepted: Beta(2,2)
Design 1' with vanishing boundary density now passes.
- Added test_off_support_boundary_rejected: boundary=0.5 on U(1,2).
- Added test_negative_boundary_rejected: boundary<0 rejected.
- Updated test_nonzero_boundary: uses boundary=float(d.min()), not
boundary=1.0 (which is off the realized support of U(1,2)).
175 tests pass (up from 172).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a29a8fa commit 8d357b6
2 files changed
Lines changed: 113 additions & 121 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
620 | 618 | | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | 619 | | |
625 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
626 | 623 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
634 | 632 | | |
635 | 633 | | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
646 | 642 | | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
654 | 647 | | |
655 | 648 | | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
664 | 656 | | |
665 | 657 | | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
| 658 | + | |
| 659 | + | |
703 | 660 | | |
704 | 661 | | |
705 | 662 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
317 | | - | |
| 316 | + | |
318 | 317 | | |
319 | | - | |
320 | 318 | | |
321 | 319 | | |
322 | 320 | | |
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
330 | 341 | | |
331 | | - | |
332 | | - | |
| 342 | + | |
333 | 343 | | |
334 | | - | |
| 344 | + | |
335 | 345 | | |
336 | 346 | | |
337 | 347 | | |
338 | | - | |
339 | | - | |
| 348 | + | |
| 349 | + | |
340 | 350 | | |
341 | 351 | | |
342 | 352 | | |
| |||
347 | 357 | | |
348 | 358 | | |
349 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
350 | 379 | | |
351 | 380 | | |
352 | 381 | | |
| |||
394 | 423 | | |
395 | 424 | | |
396 | 425 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
404 | 438 | | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | 439 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
421 | 453 | | |
422 | 454 | | |
423 | 455 | | |
| |||
446 | 478 | | |
447 | 479 | | |
448 | 480 | | |
449 | | - | |
450 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
451 | 486 | | |
452 | 487 | | |
453 | 488 | | |
454 | | - | |
| 489 | + | |
455 | 490 | | |
456 | 491 | | |
457 | 492 | | |
| |||
0 commit comments