Skip to content

Descent parity desynchronizes on hemisphere+ rings with a long edge collinear to the probe latticeΒ #107

Description

@espg

πŸ€– from Claude

Follow-up from PR #106 (Refs #103), filed on espg's go-ahead (comment). Pre-existing behavior made visible by #106's parity oracle β€” the old noise-sign machinery was strictly weaker on the same family. Not triggered by any workload reported so far; discovered by the phase-2 adversarial self-review.

Reproducer

Ring vertices (lat, lon): (10,45), (50,45), (-10,170), (-70,225), (-10,280) β€” hemisphere+ (winding taken as-given), with the first edge running 40Β° along the lon-45 meridian, i.e. collinear with the HEALPix probe lattice (base-0 centres and their descendants sit on that same near-plane, 1 ulp off coplanar).

  • Debug build (with Uniform symbolic crossing predicate: fix base-cell-boundary mis-fillΒ #106's parity oracle): polygon_to_morton_coverage(&lats, &lons, 6, true) panics β€” parity oracle diverged at uniform cell (51, 3) (and others).
  • Release build: silently wrong coverage; vs the same ring with the meridian edge nudged to lon = 45.000001, the symmetric difference is thousands of cells at order 6 (measured 8221/~22k on the pre-phase-4 head; same order of magnitude after).
  • Pinned as the #[ignore]d test test_descent_hemisphere_ring_collinear_edge_oracle in src_rust/src/coverage/tests.rs β€” un-ignore when this lands.

Diagnosis (from the PR #106 debugging session)

The seed layer is not the problem β€” after PR #106 phase 4, base_fills' donor chain is fully symbolic and every winding-classifiable seed agrees with it (pinned by test_base_fills_chain_no_antipodal_phantom).

The break is in the descent's fill chain, localized by leg-by-leg replay:

  • Seed base 0 (centre (41.81, 45), exactly on the collinear edge's segment) chains to outside β€” consistent: the donor chord from centre 1 (winding +2Ο€, inside) crosses edge 1 once.
  • Leg centre(0,0) β†’ centre(3,1) β€” both endpoints on the lon-45 near-plane, i.e. the probe is collinear with the 40Β° edge β€” counts exactly one crossing (edge 1, the transversal sibling departing the shared vertex (50,45)); the collinear edge 0 reports no crossing.
  • But centre(3,1) at (66.44, 45) is unambiguously outside (winding 0, trustworthy β€” the point is on the edge's great circle but far beyond the segment and its antipode). Odd parity between two outside points β‡’ the subtree inverts; the oracle fires at the first uniform descendant.

So the vertex-graze bookkeeping between a collinear edge and its transversal sibling at the shared vertex desynchronizes: with all sidedness signs individually exact (post-#106), the pair of verdicts (edge 0: no, edge 1: yes) is still jointly wrong by one crossing for a probe that overlaps the collinear edge over tens of degrees rather than crossing it transversally. The arcs_cross_sos 4-sign identity is exact per arc pair; what's missing is a consistency argument (or construction) for the overlap configuration β€” two nearly-identical great circles whose intersection points are determined by 1-ulp residues, where "which incident edge carries the graze" must agree with the seed's side of the same near-plane. This is exactly the long-arc/scalloped-boundary territory sphere.rs's layer-2 comment defers ("an edge-crossing PIP built on layer 2 is deferred while its long-arc behaviour is validated").

Scope / what is NOT affected

Suggested direction

  1. Characterize the overlap configuration precisely (two near-coincident circles, segment overlap, shared vertex): enumerate the exact-sign outcomes and identify the invariant that must hold between "probe endpoint's side of the edge plane" (the seed/fill semantics) and "graze attribution at the shared vertex".
  2. Candidate fixes, in increasing ambition: (a) detect probe-collinear edges (|dot(unit n_ab, p)| and |dot(unit n_ab, q)| both < Ξ΅) and handle the overlap case by splitting the parity decision at the shared vertices' exact sides β€” a bounded special case; (b) the deferred edge-crossing PIP from a fixed reference with reserved identity, replacing chained fill entirely for degenerate subtrees; (c) route the whole fill chain through exact segment-overlap reasoning (S2's VertexCrossing analogue for collinear overlaps).
  3. Whatever lands, the acceptance gate already exists: un-ignore test_descent_hemisphere_ring_collinear_edge_oracle, and the parity oracle validates every uniform cell on the whole suite.

Refs #103, PR #106.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions