Skip to content

feat(validation)!: add spherical backend and paper workflow#509

Merged
acgetchell merged 2 commits into
mainfrom
feat/507-spherical-delaunay-prototype
Jul 7, 2026
Merged

feat(validation)!: add spherical backend and paper workflow#509
acgetchell merged 2 commits into
mainfrom
feat/507-spherical-delaunay-prototype

Conversation

@acgetchell

Copy link
Copy Markdown
Owner
  • Add SphericalPoint and SphericalMetric as the spherical coordinate/metric backend for intrinsic S^D points embedded in R^(D+1).
  • Add the bounded S^2/S^3 SphericalDelaunayBuilder, SphericalDelaunayTriangulation, SphericalSimplex, geodesic distances, and typed spherical construction/validation errors.
  • Implement spherical validation through Intrinsic PL Topology, Embedding Validity, and empty-cap/ambient-hull Geometric Predicates while keeping D as the manifold dimension.
  • Expose spherical construction, validation, and topology backend types through the root and focused preludes.
  • Rename the validation hierarchy across crate docs, README, AGENTS guidance, architecture docs, semgrep fixtures, and developer docs.
  • Document spherical support as a Level 4/5 backend extension, with full 2D-5D integration and mutable-triangulation support still called out as future work.
  • Add the validation paper sources, BibTeX, generated PNG figures, tracked reviewer PDF, and papers README.
  • Rename the validation notebook to notebooks/01_validation.ipynb and make it generate reproducible validation hierarchy and failure figures.
  • Add just papers and paper-* recipes plus a dedicated papers.yml CI workflow using Tectonic, tex-fmt, chktex, uv, and notebook-generated figures.
  • Add uv-managed paper support CLIs for PDF sanity checks, deterministic PDF metadata normalization, and TeX source-date extraction.
  • Include paper artifacts in the packaged crate and ignore LaTeX build intermediates.
  • Update local/CI cargo-nextest pins and setup/tooling guidance for the new paper toolchain.

BREAKING CHANGE: Replace the legacy public SphericalSpace topology helper with SphericalPoint/SphericalMetric and the new spherical Delaunay types. Spherical Delaunay now treats D as the intrinsic dimension of S^D and stores the extra coordinate only in the spherical backend.

- Add SphericalPoint and SphericalMetric as the spherical coordinate/metric backend for intrinsic S^D points embedded in R^(D+1).
- Add the bounded S^2/S^3 SphericalDelaunayBuilder, SphericalDelaunayTriangulation, SphericalSimplex, geodesic distances, and typed spherical construction/validation errors.
- Implement spherical validation through Intrinsic PL Topology, Embedding Validity, and empty-cap/ambient-hull Geometric Predicates while keeping D as the manifold dimension.
- Expose spherical construction, validation, and topology backend types through the root and focused preludes.
- Rename the validation hierarchy across crate docs, README, AGENTS guidance, architecture docs, semgrep fixtures, and developer docs.
- Document spherical support as a Level 4/5 backend extension, with full 2D-5D integration and mutable-triangulation support still called out as future work.
- Add the validation paper sources, BibTeX, generated PNG figures, tracked reviewer PDF, and papers README.
- Rename the validation notebook to notebooks/01_validation.ipynb and make it generate reproducible validation hierarchy and failure figures.
- Add just papers and paper-* recipes plus a dedicated papers.yml CI workflow using Tectonic, tex-fmt, chktex, uv, and notebook-generated figures.
- Add uv-managed paper support CLIs for PDF sanity checks, deterministic PDF metadata normalization, and TeX source-date extraction.
- Include paper artifacts in the packaged crate and ignore LaTeX build intermediates.
- Update local/CI cargo-nextest pins and setup/tooling guidance for the new paper toolchain.

BREAKING CHANGE: Replace the legacy public SphericalSpace topology helper with SphericalPoint/SphericalMetric and the new spherical Delaunay types. Spherical Delaunay now treats D as the intrinsic dimension of S^D and stores the extra coordinate only in the spherical backend.
@acgetchell acgetchell self-assigned this Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: a591f9b1-5006-4c00-883d-4a171e6f17a1

📥 Commits

Reviewing files that changed from the base of the PR and between 8a4b5f2 and 0c2293e.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • papers/validation.pdf is excluded by !**/*.pdf
📒 Files selected for processing (32)
  • .github/workflows/papers.yml
  • AGENTS.md
  • Cargo.toml
  • README.md
  • benches/README.md
  • benches/pachner_stress.rs
  • docs/dev/commands.md
  • docs/dev/debug_env_vars.md
  • docs/dev/docs.md
  • docs/validation.md
  • docs/workflows.md
  • justfile
  • notebooks/01_validation.ipynb
  • notebooks/02_pachner_stress_cli.ipynb
  • papers/validation.tex
  • pyproject.toml
  • scripts/paper_check.py
  • scripts/paper_pdf_normalize.py
  • scripts/paper_source_date.py
  • scripts/tests/test_paper_check.py
  • scripts/tests/test_paper_pdf_normalize.py
  • scripts/tests/test_paper_source_date.py
  • semgrep.yaml
  • src/config.rs
  • src/delaunay/pachner.rs
  • src/delaunay/spherical.rs
  • src/lib.rs
  • src/topology/spaces/spherical.rs
  • tests/cli.rs
  • tests/pachner_roundtrip.rs
  • tests/semgrep/docs/validation_levels.md
  • tests/spherical_delaunay.rs
💤 Files with no reviewable changes (2)
  • notebooks/02_pachner_stress_cli.ipynb
  • README.md
✅ Files skipped from review due to trivial changes (5)
  • tests/semgrep/docs/validation_levels.md
  • docs/dev/docs.md
  • AGENTS.md
  • docs/workflows.md
  • benches/README.md
🚧 Files skipped from review as they are similar to previous changes (8)
  • pyproject.toml
  • .github/workflows/papers.yml
  • scripts/tests/test_paper_check.py
  • scripts/tests/test_paper_source_date.py
  • semgrep.yaml
  • src/lib.rs
  • scripts/paper_pdf_normalize.py
  • docs/validation.md

Walkthrough

This PR adds a bounded spherical Delaunay prototype, renames validation terminology across code and docs, refactors Pachner-stress execution to a mode-aware flow, and introduces a papers build/validation pipeline with CI, scripts, notebook support, and manuscript assets.

Changes

Spherical Validation and Terminology

Layer / File(s) Summary
Spherical point and metric backend
src/topology/spaces/spherical.rs, src/topology/traits/global_topology_model.rs, src/topology/traits/topological_space.rs
Replaces the spherical space API with fallible spherical point and metric types, plus related topology model and topological space documentation updates.
Spherical Delaunay builder and triangulation
src/delaunay/spherical.rs
Adds spherical simplices, spherical triangulation validation, and the builder that constructs triangulations from ambient convex-hull facets with layered Level 3/4/5 checks.
Spherical exports and tests
src/lib.rs, tests/prelude_exports.rs, tests/spherical_delaunay.rs
Exposes spherical types from lib and prelude modules and adds integration tests for spherical construction, validation, and export coverage.
Validation terminology in docs and guidance
README.md, AGENTS.md, CITATION.cff, docs/*, semgrep.yaml, tests/semgrep/...
Renames validation levels and updates topology, workflows, README, architecture, semgrep, and guidance docs to match the five-level hierarchy and spherical prototype scope.

Pachner Workflow Refactor

Layer / File(s) Summary
Pachner mode, telemetry, and diagnostics
src/config.rs
Adds mode-aware Pachner stress configuration, telemetry fields, normalized diagnostics, and related CLI/config error handling.
Topology-scope Pachner proposal execution
src/delaunay/pachner.rs, tests/pachner_roundtrip.rs
Switches Pachner proposal feasibility to borrowed references, adds topology-scope move execution with rollback and orientation repair, and updates tests for the new ownership and validation behavior.
Pachner stress benchmark and tests
benches/pachner_stress.rs, tests/cli.rs, docs/dev/commands.md, docs/dev/debug_env_vars.md, benches/README.md
Reworks the stress benchmark to round-trip moves, updates CLI tests for mode-aware output, and adjusts benchmark documentation and debug guidance.

Papers Publishing Infrastructure

Layer / File(s) Summary
Paper workflow CI and tooling setup
.github/workflows/papers.yml, justfile, .github/workflows/ci.yml, .github/workflows/codecov.yml, docs/dev/tooling-alignment.md
Adds the papers GitHub Actions workflow and the justfile recipes that build, lint, normalize, and verify paper artifacts, plus tooling pins and setup checks.
Paper scripts and console entry points
scripts/paper_check.py, scripts/paper_pdf_normalize.py, scripts/paper_source_date.py, pyproject.toml, scripts/tests/*
Adds the paper PDF check/normalize/source-date Python scripts, exposes them as console entry points, and adds their supporting tests.
Paper assets and packaging
papers/validation.tex, papers/validation.bib, papers/README.md, Cargo.toml, .gitignore, docs/architecture/project_structure.md, notebooks/01_validation.ipynb
Adds the paper manuscript, bibliography, README, notebook figure generation, packaging includes, and repository layout documentation for paper artifacts.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

  • acgetchell/delaunay#477: This PR and the current changes both touch Pachner move workflows, proposal execution, and related stress paths.
  • acgetchell/delaunay#489: The borrowed feasibility and provenance-handling changes in src/delaunay/pachner.rs build on the same Pachner API surface.
  • acgetchell/delaunay#508: Both PRs modify the spherical topology implementation and its canonicalization/validation model.

Poem

A rabbit hopped through spheres so bright,
And paper builds took careful flight.
Five levels named with tidy care,
While Pachner moves now round-trip იქ?
🐇✨ PDFs and proofs alike take shape tonight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding the spherical backend and paper workflow, with the breaking-change prefix fitting the scope.
Description check ✅ Passed The description matches the changeset well, covering the spherical backend, validation docs, paper workflow, notebook, scripts, and tooling updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/507-spherical-delaunay-prototype

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Jul 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 269 complexity

Metric Results
Complexity 269

View in Codacy

🟢 Coverage 81.19% diff coverage · -0.18% coverage variation

Metric Results
Coverage variation -0.18% coverage variation (-1.00%)
Diff coverage 81.19% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (69f08d5) 78696 71783 91.22%
Head commit (0c2293e) 79921 (+1225) 72759 (+976) 91.04% (-0.18%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#509) 1340 1088 81.19%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai Bot added api breaking change enhancement New feature or request geometry Geometry-related issues rust Pull requests that update rust code topology labels Jul 6, 2026
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.19403% with 252 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.01%. Comparing base (69f08d5) to head (0c2293e).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/delaunay/spherical.rs 83.40% 148 Missing ⚠️
src/delaunay/pachner.rs 59.92% 103 Missing ⚠️
src/topology/spaces/spherical.rs 99.47% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
- Coverage   91.19%   91.01%   -0.18%     
==========================================
  Files          87       88       +1     
  Lines       78475    79700    +1225     
==========================================
+ Hits        71564    72540     +976     
- Misses       6911     7160     +249     
Flag Coverage Δ
unittests 91.01% <81.19%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (5)
.github/workflows/papers.yml (1)

99-100: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

No drift check between rebuilt and committed paper artifacts.

The job rebuilds papers/validation.pdf and papers/generated/*.png via just papers but never verifies the result matches the tracked copies, so a stale committed PDF/figure (e.g., someone edits papers/validation.tex without re-running the build) would still pass CI.

♻️ Proposed addition
       - name: Build papers
         run: just papers
+
+      - name: Verify tracked paper artifacts are up to date
+        run: git diff --exit-code -- papers/
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/papers.yml around lines 99 - 100, The papers workflow
currently rebuilds artifacts with just papers but never checks for drift against
the committed outputs, so add a verification step after the build in the papers
job that compares the regenerated papers/validation.pdf and
papers/generated/*.png files with what is tracked in the repo and fails if they
differ. Use the existing Build papers job in the workflow to locate the change,
and make the new check explicit so CI catches stale paper artifacts whenever
validation.tex or related inputs change without a corresponding rebuild.
scripts/paper_source_date.py (1)

30-46: 📐 Maintainability & Code Quality | 🔵 Trivial

Redundant re-parsing of the same date string.

parse_paper_source_date parses raw_date with strptime (Line 62) to build instant, and then PaperSourceDate.__post_init__ re-parses the exact same string again (Line 36) to validate agreement. Deriving instant from raw inside a single validated constructor (or a classmethod) would avoid duplicate parsing logic.

Also applies to: 53-67

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/paper_source_date.py` around lines 30 - 46,
`PaperSourceDate.__post_init__` is redundantly re-parsing the same `raw` date
string already handled by `parse_paper_source_date`/`from_raw`, so move the
shared parsing/validation into a single constructor path or classmethod and have
`__post_init__` only enforce invariants on the already-derived `instant`. Keep
the existing checks in `PaperSourceDate`, but avoid calling `datetime.strptime`
twice for the same value by deriving `instant` once from `raw` and reusing that
result throughout construction.
semgrep.yaml (1)

1921-1923: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Broaden the matcher to catch plain “Delaunay property” phrasing.

The updated rationale says stale four-level wording should be caught, but the matcher below still only covers Level-4-qualified variants. That leaves bare “Delaunay property” text undetected, so the rule can miss the rename in docs.

Suggested fix
-      (?i)(?:\b4-level validation hierarchy\b|\bfour levels of validation\b|\blevel 4:\s*delaunay
-      property\b|\bdelaunay property\s*\(level 4\)|\bdelaunay level 4 validation\b)
+      (?i)(?:\b4-level validation hierarchy\b|\bfour levels of validation\b|\blevel 4:\s*delaunay
+      property\b|\bdelaunay property\s*\(level 4\)|\bdelaunay level 4 validation\b|\bdelaunay property\b)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@semgrep.yaml` around lines 1921 - 1923, The matcher for the validation-stack
docs rule is too narrow because it only matches Level 4-qualified Delaunay
wording and misses plain “Delaunay property” references. Update the semgrep rule
in semgrep.yaml so the relevant pattern covers bare “Delaunay property” phrasing
as well, while still catching the existing Level 4 variants; use the existing
rule section around the validation hierarchy matcher to adjust the pattern set
without changing unrelated matches.
src/delaunay/spherical.rs (2)

257-268: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Spherical validation surface lacks is_valid_*/*_report parity with other layers.

SphericalDelaunayTriangulation only exposes validate(), validate_topology(), validate_embedding(), validate_delaunay() (all Result-returning, cumulative). As per coding guidelines, src/**/*.rs: "each layer should expose the standard validation surface (is_valid, is_valid_*, *_diagnostic, *_report, validate(), validation_report())" — matching the pattern used by Tds/Triangulation/DelaunayTriangulation elsewhere in the crate. Consider adding cheap boolean is_valid_topology/is_valid_embedding/is_valid_delaunay wrappers (and eventually a cumulative report) for API consistency, even in this prototype.

Also applies to: 277-350, 465-489, 491-515

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/delaunay/spherical.rs` around lines 257 - 268, The
SphericalDelaunayTriangulation validation API is missing the standard
boolean/report surface used by other layers, so extend the existing
validate_topology, validate_embedding, and validate_delaunay methods with cheap
is_valid_topology, is_valid_embedding, and is_valid_delaunay wrappers, and add a
cumulative validation_report/diagnostic path if appropriate. Keep the new
methods aligned with the patterns already used by Tds, Triangulation, and
DelaunayTriangulation so the spherical prototype exposes the same validation
surface while reusing the existing validation logic.

Source: Coding guidelines


517-610: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate origin/degenerate-hyperplane check between embedding and Delaunay validation.

validate_embedding_with_ambient (Lines 522-552) and validate_delaunay_with_ambient (Lines 558-586) both compute origin_side via simplex_orientation_with_point and reject on Orientation::DEGENERATE with the identical error. Since validate_delaunay() already calls self.validate_embedding()? first, this hyperplane-degeneracy check runs twice per simplex. Consider extracting a shared helper (e.g., origin_side_for_simplex) that validate_delaunay_with_ambient reuses instead of recomputing.

♻️ Sketch of a shared helper
+    fn origin_side_for_simplex<const A: usize>(
+        &self,
+        simplex_index: usize,
+        simplex: &SphericalSimplex<D>,
+    ) -> Result<Orientation, SphericalDelaunayValidationError> {
+        let origin = Point::<A>::try_new([0.0; A]).map_err(|source| {
+            SphericalDelaunayValidationError::AmbientPointValidation { point_index: None, source }
+        })?;
+        let side = self.simplex_orientation_with_point::<A>(simplex_index, simplex, origin, None)?;
+        if side == Orientation::DEGENERATE {
+            return Err(SphericalDelaunayValidationError::SimplexHyperplaneContainsOrigin {
+                simplex_index,
+                simplex_vertices: simplex.vertex_indices().to_vec(),
+            });
+        }
+        Ok(side)
+    }

Both validate_embedding_with_ambient and validate_delaunay_with_ambient would then call this once.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/delaunay/spherical.rs` around lines 517 - 610, The
origin-side/degenerate-hyperplane check is duplicated in both
validate_embedding_with_ambient and validate_delaunay_with_ambient, causing the
same simplex_orientation_with_point logic and Orientation::DEGENERATE rejection
to run twice. Extract the shared origin-side computation into a small helper
(for example, an origin_side_for_simplex-style method) and have both validation
paths call it, with validate_delaunay_with_ambient reusing the result instead of
recomputing it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/papers.yml:
- Around line 19-27: The papers workflow trigger is missing some build inputs
and does not verify generated artifacts after the build. Update the paths
filters in the workflow to include scripts/paper_pdf_normalize.py,
scripts/paper_source_date.py, and their tests, then add a post-build diff check
in the papers job that compares papers/validation.pdf and papers/generated/*.png
against the committed versions. Use the existing just papers step as the rebuild
source, and ensure the new diff step fails when regenerated outputs differ.

In `@docs/validation.md`:
- Around line 87-94: Clarify the default validation-policy behavior in the
incremental construction docs: the current wording makes it sound like
suspicion-based checking is the default for all insertions, but PLManifold
starts with ValidationPolicy::ExplicitOnly while only the Pseudomanifold path
uses OnSuspicion. Update the paragraph in the validation documentation to
explicitly distinguish these defaults and reference the incremental construction
path and ValidationPolicy names so readers can see which behavior applies to
each triangulation mode.

In `@docs/workflows.md`:
- Around line 492-493: The workflow text still uses the old “Delaunay property”
wording, so update the remaining Level 5 reference to the new Intrinsic PL
Topology terminology. In the workflow description that mentions validation and
optional repair/verify steps, replace the outdated phrase with the corresponding
Level 5 name so the section is consistent with the rest of the document and the
symbols to locate are the workflow bullet list and the “verify”/“repair”
wording.

In `@pyproject.toml`:
- Around line 59-61: The Ruff isort configuration is missing two new first-party
modules, so import grouping may treat them as third-party. Update the
`known-first-party` list in the `pyproject.toml` Ruff section to include
`paper_pdf_normalize` and `paper_source_date` alongside `paper_check`, keeping
the list aligned with the `py-modules` entries so `paper_pdf_normalize.py` and
`paper_source_date.py` are classified correctly.

In `@scripts/paper_source_date.py`:
- Around line 15-16: The paper-date parsing in scripts/paper_source_date.py
still depends on the process locale through PAPER_DATE_FORMAT and the parsing
logic that uses datetime.strptime, so adjust the date handling in the relevant
parsing function(s) to be locale-independent. Either replace the
locale-sensitive month parsing with an explicit month-name lookup or set LC_TIME
to a fixed English locale such as C or C.UTF-8 before parsing, and make sure the
behavior is consistent in the code paths that read DATE_COMMAND_RE matches.

---

Nitpick comments:
In @.github/workflows/papers.yml:
- Around line 99-100: The papers workflow currently rebuilds artifacts with just
papers but never checks for drift against the committed outputs, so add a
verification step after the build in the papers job that compares the
regenerated papers/validation.pdf and papers/generated/*.png files with what is
tracked in the repo and fails if they differ. Use the existing Build papers job
in the workflow to locate the change, and make the new check explicit so CI
catches stale paper artifacts whenever validation.tex or related inputs change
without a corresponding rebuild.

In `@scripts/paper_source_date.py`:
- Around line 30-46: `PaperSourceDate.__post_init__` is redundantly re-parsing
the same `raw` date string already handled by
`parse_paper_source_date`/`from_raw`, so move the shared parsing/validation into
a single constructor path or classmethod and have `__post_init__` only enforce
invariants on the already-derived `instant`. Keep the existing checks in
`PaperSourceDate`, but avoid calling `datetime.strptime` twice for the same
value by deriving `instant` once from `raw` and reusing that result throughout
construction.

In `@semgrep.yaml`:
- Around line 1921-1923: The matcher for the validation-stack docs rule is too
narrow because it only matches Level 4-qualified Delaunay wording and misses
plain “Delaunay property” references. Update the semgrep rule in semgrep.yaml so
the relevant pattern covers bare “Delaunay property” phrasing as well, while
still catching the existing Level 4 variants; use the existing rule section
around the validation hierarchy matcher to adjust the pattern set without
changing unrelated matches.

In `@src/delaunay/spherical.rs`:
- Around line 257-268: The SphericalDelaunayTriangulation validation API is
missing the standard boolean/report surface used by other layers, so extend the
existing validate_topology, validate_embedding, and validate_delaunay methods
with cheap is_valid_topology, is_valid_embedding, and is_valid_delaunay
wrappers, and add a cumulative validation_report/diagnostic path if appropriate.
Keep the new methods aligned with the patterns already used by Tds,
Triangulation, and DelaunayTriangulation so the spherical prototype exposes the
same validation surface while reusing the existing validation logic.
- Around line 517-610: The origin-side/degenerate-hyperplane check is duplicated
in both validate_embedding_with_ambient and validate_delaunay_with_ambient,
causing the same simplex_orientation_with_point logic and
Orientation::DEGENERATE rejection to run twice. Extract the shared origin-side
computation into a small helper (for example, an origin_side_for_simplex-style
method) and have both validation paths call it, with
validate_delaunay_with_ambient reusing the result instead of recomputing it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 6f71ad19-490a-4956-8699-116888e51705

📥 Commits

Reviewing files that changed from the base of the PR and between 69f08d5 and 8a4b5f2.

⛔ Files ignored due to path filters (4)
  • papers/generated/validation_hierarchy.png is excluded by !**/*.png, !**/generated/**
  • papers/generated/validation_model_failures.png is excluded by !**/*.png, !**/generated/**
  • papers/validation.pdf is excluded by !**/*.pdf
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (47)
  • .github/workflows/ci.yml
  • .github/workflows/codecov.yml
  • .github/workflows/papers.yml
  • .gitignore
  • AGENTS.md
  • CITATION.cff
  • Cargo.toml
  • README.md
  • docs/ORIENTATION_SPEC.md
  • docs/README.md
  • docs/api_design.md
  • docs/architecture/module_map.md
  • docs/architecture/prelude_reference.md
  • docs/architecture/project_structure.md
  • docs/code_organization.md
  • docs/dev/commands.md
  • docs/dev/docs.md
  • docs/dev/tooling-alignment.md
  • docs/invariants.md
  • docs/limitations.md
  • docs/topology.md
  • docs/validation.md
  • docs/workflows.md
  • justfile
  • notebooks/01_validation.ipynb
  • papers/README.md
  • papers/validation.bib
  • papers/validation.tex
  • pyproject.toml
  • scripts/paper_check.py
  • scripts/paper_pdf_normalize.py
  • scripts/paper_source_date.py
  • scripts/tests/test_paper_check.py
  • scripts/tests/test_paper_pdf_normalize.py
  • scripts/tests/test_paper_source_date.py
  • semgrep.yaml
  • src/config.rs
  • src/core/tds/storage.rs
  • src/core/validation.rs
  • src/delaunay/spherical.rs
  • src/lib.rs
  • src/topology/spaces/spherical.rs
  • src/topology/traits/global_topology_model.rs
  • src/topology/traits/topological_space.rs
  • tests/prelude_exports.rs
  • tests/semgrep/docs/validation_levels.md
  • tests/spherical_delaunay.rs

Comment thread .github/workflows/papers.yml
Comment thread docs/validation.md Outdated
Comment thread docs/workflows.md Outdated
Comment thread pyproject.toml
Comment thread scripts/paper_source_date.py Outdated
- Make spherical topology own `S^d` point canonicalization, ambient `R^(d+1)` helpers, geodesic distances, and layered topology/embedding/Delaunay validation wrappers.
- Simplify Pachner stress tooling around direct round-trip and random-walk workloads with stable benchmark fixtures.
- Keep the validation manuscript as author-owned outline scaffolding and wire paper figure, PDF sanity, source-date, and CI freshness checks into the paper workflow.
- Strengthen paper helper scripts and notebook generation with typed parsing for page counts, source dates, PDF normalization, and generated validation figures.

BREAKING CHANGE: spherical topology helpers and Pachner stress workflows were reorganized around the canonical topology backend and direct `round-trip`/`random-walk` interfaces.
@acgetchell
acgetchell enabled auto-merge (squash) July 7, 2026 03:29
@acgetchell
acgetchell disabled auto-merge July 7, 2026 03:33
@coderabbitai coderabbitai Bot removed enhancement New feature or request rust Pull requests that update rust code breaking change geometry Geometry-related issues api topology labels Jul 7, 2026
@acgetchell
acgetchell enabled auto-merge (squash) July 7, 2026 04:12
@acgetchell
acgetchell merged commit 3033088 into main Jul 7, 2026
25 of 26 checks passed
@acgetchell
acgetchell deleted the feat/507-spherical-delaunay-prototype branch July 7, 2026 04:29
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.

Prototype 2D/3D spherical Delaunay construction via convex-hull duality

1 participant