H3 (GaussBonnet suite, test_phase6.cpp):
- EnforceReturnsCorrectionMagnitude_LargeCorrection: feeds tetrahedron
with all theta_v=0, asserts returned correction is exactly 4pi.
- EnforceReturnsCorrectionMagnitude_NearZeroWhenAlreadyCorrect: angles
already satisfy GB, asserts correction near zero.
- EnforceRawMapOverload_ReturnsCorrection: verifies the raw-map overload
also returns the correction magnitude.
H4 (PeriodMatrix suite, test_phase7.cpp):
- ReduceToFD_ThrowsForRealAxisBoundary: the boundary Im(tau)==0.0 (real
axis) must throw domain_error, covering the <= guard's exact boundary.
H5 (NewtonSolver suite, test_newton_solver.cpp):
- Euclidean_SliverTriangle_CharacterizedBehavior: near-degenerate sliver
triangle (aspect ratio ~10000) — solver must not crash or NaN, and
must not report LinearSolverFailed (system is still consistent).
- Euclidean_ExactDegenerateTriangle_NoCrash: collinear vertices (zero
area) — euclidean_cot_weights returns {0,0,0,false}; asserts no crash
and that the reported status is a meaningful failure mode.
V5 (Serialization suite, test_layout.cpp):
- LoadResultXml_RejectsReformattedRootElement: <ConformalResult> with
geometry= on a separate line throws runtime_error.
- LoadResultXml_RejectsDOFVectorWithTagOpenOnSeparateLine: <DOFVector>
with '>' on a separate line throws runtime_error.
- LoadResultXml_CanonicalFormatStillWorks: regression guard confirming
save_result_xml canonical output still round-trips correctly.
V6 (Serialization suite, test_layout.cpp):
- CheckDofVectorSize_ThrowsOnMismatch: size 3 vs expected 5 throws.
- CheckDofVectorSize_PassesOnMatch: exact match does not throw.
- CheckDofVectorSize_ErrorMessageNamesExpectedAndActual: exception
message contains both the actual and expected sizes.
Total CGAL tests: 313 (up from 298; 15 new tests, 0 failures).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Finding-B from doc/reviewer/external-audit-2026-05-30.md.
The Euclidean Gauss–Bonnet identity Σ(2π−Θ_v) = 2π·χ is ONLY valid for
flat/Euclidean and spherical metrics. For hyperbolic metrics (HyperIdeal)
the correct identity is Σ(2π−Θ_v) − Area(M) = 2π·χ. The previously
provided gauss_bonnet_sum(HyperIdealMaps) overload would silently pass the
wrong LHS to check_gauss_bonnet, which would always throw "deficit = ±Area"
for valid hyperbolic targets.
Fix:
- gauss_bonnet_sum(mesh, HyperIdealMaps) → = delete + explanation comment
- enforce_gauss_bonnet(mesh, HyperIdealMaps&) → = delete + explanation comment
- Header box comment rewritten with the correct hyperbolic Gauss–Bonnet
identity and a clear "HyperIdeal: NOT SUPPORTED" section
New test in test_phase6.cpp:
- HyperIdeal_EuclideanSumDiscrepancy_DocumentsWhyCheckIsDeleted
verifies numerically that the Euclidean sum = 0 but 2π·χ = 4π for a
regular tetrahedron, documenting the −4π discrepancy that motivated
the deletion
- Three compile-time static_asserts (SFINAE) confirm the overload is not
invocable with HyperIdealMaps but remains so with Euclidean/SphericalMaps
263/263 CGAL tests pass, 0 failed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit closes the remaining red gates so `run-all.sh --fast` is
green end-to-end on the canonical dev machine.
New gates
─────────
1. cmake-format / cmake-lint
* scripts/quality/cmake-format.sh — dry-run by default,
--strict to fail on drift, --fix to apply
* .cmake-format.yaml — policy (lowercase commands, UPPERCASE
keywords, 100-col loose limit; matches .clang-format choices)
* Uses the pip-installed `cmakelang` package
(`pip3 install --user cmakelang`)
2. codespell
* scripts/quality/codespell.sh — exit 1 on any typo, --fix
interactively
* .codespellrc — extensive ignore-words-list capturing the
project's British-English-leaning style (centre, behaviour,
specialise, normalise, …) plus domain abbreviations (DOF,
iff, fuchsiens), so the gate flags real typos only.
* Validated: 0 typos across docs + code/include + scripts +
code/{src,tests}.
SPDX rollout (license-headers --fix)
────────────────────────────────────
license-headers.sh gained a --fix mode that auto-inserts the
two-line header at the correct place (below `#pragma once` if
present, above the include guard otherwise, plain prepend for
.cpp). Ran it on 60 of 66 files — 100 %-licensed now.
Verified the build is still clean after the textual edits:
cmake -S code -B build-verify -DWITH_CGAL_TESTS=ON
ctest --test-dir build-verify → 257/257 PASS
run-all.sh + README updated to include the two new gates.
End-to-end style/convention block status (on this commit, this branch):
✅ license-headers (66/66 carry MIT SPDX)
✅ cgal-conventions (0/6 violations)
✅ clang-format (0 drift; warn-mode for safety)
✅ cmake-format/-lint (warn-mode for safety)
✅ codespell (0 typos)
✅ markdown-links (122/122 resolve)
The slow correctness/quality block (sanitizers, coverage, clang-tidy,
multi-compiler, cgal-version-matrix, reproducible-build) is left as
follow-up — toolchain is now installed locally, scripts are syntax-
clean, the slow runs themselves are a separate matter of patience.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>