Tarik Moussa
|
2325328f77
|
test: add end-to-end skewed-torus and synthetic holonomy Re(τ)<0 tests
Finding-H from doc/reviewer/external-audit-2026-05-30.md
(java-port-audit missing-test item 7).
Guards against a regression where compute_period_matrix reverts to
reduce_to_fundamental_domain (no mirror fold) instead of normalizeModulus
(Finding 6 fix, Java-faithful): such a revert would silently produce
Re(τ) < 0 for lattices where the natural generators give a negative
real part.
Two new tests in test_phase7.cpp:
1. SkewedTorus_ReTauNegativeBeforeNorm_FoldedToPositive
- New mesh: code/data/off/torus_skewed_4x4.off
Flat 4×4 torus on parallelogram lattice ω₁=(4,0) ω₂=(-1,4);
16 vertices, 32 triangles, χ=0 (genus 1).
- Full pipeline: newton_euclidean → cut_graph → euclidean_layout
→ compute_period_matrix(reduce=false) + compute_period_matrix(reduce=true)
- Asserts: raw Re(τ) < 0, normalized Re(τ) ∈ [0,½], Im(τ) > 0, |τ| ≥ 1
2. SyntheticHolonomy_NegativeReTau_NormalizedToPositive
- Bypasses mesh; supplies explicit ω₁=(4,0) ω₂=(-1,4) directly
- Asserts raw τ = -0.25+i (to 1e-10), normalized τ = 0.25+i (to 1e-9)
- Pin-points the mirror fold: Re(-0.25) → Re(+0.25)
277/277 CGAL tests pass, 0 failed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-31 01:17:27 +02:00 |
|