Skip to content

test(#285) regression test for horizontal-bisecting on trigonal-rhombohedral#287

Merged
prjemian merged 1 commit into
mainfrom
285-bisecting-horizontal-trigonal
May 20, 2026
Merged

test(#285) regression test for horizontal-bisecting on trigonal-rhombohedral#287
prjemian merged 1 commit into
mainfrom
285-bisecting-horizontal-trigonal

Conversation

@prjemian

Copy link
Copy Markdown
Collaborator

Adds tests/test_regression_issue_285.py covering the three
horizontal-bisecting cases from the issue body:

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

Replayed the issue's verbatim self-contained reproducer in a clean
Python 3.14.4 / numpy 2.4.6 venv across released versions:

version fourch / bisecting psic / bisecting_vertical kappa6c / bisecting_horizontal
v0.10.0 2 valid solutions 2 valid solutions 0 solutions (real failure)
v0.10.1 2 valid solutions 2 valid solutions 0 solutions (real failure)
v0.11.0 (PyPI) 2 valid solutions 2 valid solutions 2 valid solutions
main (post-#284) 2 valid solutions 2 valid solutions 2 valid solutions

Every returned solution round-trips correctly through inverse().

  • The fourch bisecting and psic bisecting_vertical claims in the
    issue 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_UB of two seed reflections at
    chosen positions), and the simplification to ub_identity lost
    the specific UB orientation that produced the zero-solution branch
    selection.
  • The kappa6c bisecting_horizontal zero-solution failure was real
    on v0.10.x and was eliminated by the issue Audit order of rotations used in forward() / inverse() #280 composition-order
    overhaul 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

  • No CHANGES.md update (test-only PR per AGENTS.md policy).
  • No hot-path source files touched, so slow benchmark suite was not
    re-run; full pytest suite passes locally (2574 passed, 2 skipped, 3
    deselected, 100 % coverage).

Contributed by: OpenCode (argo/claudeopus47)

…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)
@prjemian prjemian merged commit 9e1f86e into main May 20, 2026
6 checks passed
@prjemian prjemian deleted the 285-bisecting-horizontal-trigonal branch May 20, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Horizontal-bisecting modes cannot reach trigonal-rhombohedral (1, 1, 0)

1 participant