Skip to content

Evaluate relaxing node_straddles containment now that on_minor_arc is SoS-hardenedΒ #90

Description

@espg

πŸ€– from Claude

Tracking follow-up β€” awaiting triage. No action label applied yet; leaving label/triage to the maintainer.

Context

PR #87 (Refs #78) made robust_crossing's antipodal-disambiguation step on_minor_arc exactly SoS-hardened: each wedge sign is now decided on a canonical, identity-sorted evaluation with an identity-keyed symbolic perturbation tie-break, so the predicate is total and reorder-invariant with no residual f64 sign sensitivity at endpoint coincidence.

Before that change, the caveat at src_rust/src/coverage.rs:442 noted that boundary cells affected by on_minor_arc's residual float sensitivity were caught by the node_straddles over-refinement safety net β€” such cells are refined (descended into) rather than filled whole. Now that the disambiguation is exact, that safety net may be loosenable: some cells the descent currently over-refines for safety might be safely fillable, reducing output size / work.

Re-scope (post PR #106 / issue #103) β€” supersedes the plan below where they differ

PR #106 replaced the entire crossing pipeline with the uniform symbolic predicate (arcs_cross_sos + exact determinant signs), so the node_straddles over-refinement is no longer load-bearing for correctness anywhere β€” it is now pure conservatism, and this issue's measure-then-relax program can be run safely. Adjustments:

  1. Baseline = PR Uniform symbolic crossing predicate: fix base-cell-boundary mis-fillΒ #106's branch (or main once it merges), not pre-SoS-harden on_minor_arc in robust_crossingΒ #87 main. The measurement is only meaningful against the exact predicate.
  2. Relaxation target = the non-touching straddle over-refinement only. The closed-set contract from morton_coverage / from_wkt mis-fill polygons whose edges lie on base-cell boundaries (lon ≑ 0 mod 45Β°, lat = 0)Β #103 deliberately refines and includes boundary-touching cells (edge_hits_cell_edge's exact-incidence path); those refinements are contract, not waste, and must be excluded from the "over-refinement" count.
  3. Guard rail: PR Uniform symbolic crossing predicate: fix base-cell-boundary mis-fillΒ #106's parity oracle (debug_assert in the descent) validates every uniform cell against the independent winding PIP β€” any relaxation experiment runs under it in the test profile, which the original plan lacked.

Recommendation

Measure before changing behavior. Specifically:

  1. Quantify the over-refinement node_straddles currently causes (count of cells refined-not-filled, excluding closed-set boundary-touch refinements, across representative polygons) against the exact-predicate baseline.
  2. Only then decide whether/how to relax the containment, with the measurement as the baseline to confirm no coverage correctness regression.

Do not change descent/containment behavior blind β€” the current over-refinement is conservative-correct, so any relaxation must be justified by a measured win and guarded by tests (and the parity oracle).

Refs #87
Refs #78
Refs #103, PR #106

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions