test(#285) regression test for horizontal-bisecting on trigonal-rhombohedral#287
Merged
Merged
Conversation
…edral
Add tests/test_regression_issue_285.py covering the three
(geometry, mode) cases from the issue's reproducer block:
fourch / bisecting
psic / bisecting_vertical
kappa6c / bisecting_horizontal
Each test asserts that forward(1, 1, 0) on a trigonal-rhombohedral
cell (a=b=c=7.0, alpha=beta=gamma=72) returns at least one solution
that round-trips through inverse() back to (1, 1, 0).
Investigation summary (full details in the test module docstring):
| version | fourch | psic | kappa6c |
|------------------|--------|------|---------|
| v0.10.0 | 2 sol | 2 sol| 0 (FAIL)|
| v0.10.1 | 2 sol | 2 sol| 0 (FAIL)|
| v0.11.0 (PyPI) | 2 sol | 2 sol| 2 sol |
| main (post-#284) | 2 sol | 2 sol| 2 sol |
The fourch/psic claims in the issue body do not reproduce on any
released version. The kappa6c failure was real on v0.10.x and was
fixed by the issue #280 composition-order overhaul shipped in
v0.11.0. No code change is required; the new tests pin down the
working behavior so any future regression is caught immediately.
Contributed by: OpenCode (argo/claudeopus47)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
tests/test_regression_issue_285.pycovering the threehorizontal-bisecting cases from the issue body:
Each test asserts that
forward(1, 1, 0)on a trigonal-rhombohedralcell (
a=b=c=7.0, alpha=beta=gamma=72) returns at least one solutionthat round-trips through
inverse()back to(1, 1, 0).Investigation summary
Replayed the issue's verbatim self-contained reproducer in a clean
Python 3.14.4 / numpy 2.4.6 venv across released versions:
Every returned solution round-trips correctly through
inverse().fourch bisectingandpsic bisecting_verticalclaims in theissue do not reproduce on any released version. Most likely
explanation: the issue's "self-contained reproducer" was
synthesized from a downstream cross-validation harness that uses a
bootstrapped UB (from
calc_UBof two seed reflections atchosen positions), and the simplification to
ub_identitylostthe specific UB orientation that produced the zero-solution branch
selection.
kappa6c bisecting_horizontalzero-solution failure was realon v0.10.x and was eliminated by the issue Audit order of rotations used in
forward()/inverse()#280 composition-orderoverhaul shipped in v0.11.0 (most likely the BL1967 B-matrix
correction in phase 3, which changed the reciprocal-lattice
geometry for non-orthogonal cells).
No code change in the package is required. The new regression test
pins down the working behavior so any future regression on the
rhombohedral path is caught immediately.
Notes
re-run; full pytest suite passes locally (2574 passed, 2 skipped, 3
deselected, 100 % coverage).
Contributed by: OpenCode (argo/claudeopus47)