Commit a1a522d
Address CI review: default n_simulation_failures=0 + all-failed test
Two items from CI AI review on PR #326:
1. P2 backward-compat: moving `n_simulation_failures` to the end of
`SimulationPowerResults` with a default of `0`. Users who manually
instantiate the dataclass with the pre-PR field order continue to
work; `simulate_power()` still fills the field in via keyword. The
field remains part of `to_dict()` output (PR-level contract
unchanged).
2. P3 coverage: adding a regression test for the all-failed escape
path. An estimator that raises `ValueError` on every replicate now
asserts both the `RuntimeError("All simulations failed. ...")`
message and that the narrow-except filter doesn't swallow it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent af56950 commit a1a522d
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | | - | |
1030 | 1029 | | |
1031 | 1030 | | |
1032 | 1031 | | |
| |||
1039 | 1038 | | |
1040 | 1039 | | |
1041 | 1040 | | |
| 1041 | + | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
629 | 647 | | |
630 | 648 | | |
631 | 649 | | |
| |||
0 commit comments