test: Audit numerical invariants across every mesh interpolator - #611
Merged
Merged
Conversation
This was referenced Oct 2, 2026
Collaborator
Author
|
Linked workspace source-recovery checks and durable audit report: PyAutoLabs/autolens_workspace_test#342. Preserve library-first merge order; issue #603 covers both PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add independent numerical regression coverage for all mesh interpolator classes, including rank and kernel adaptive variants. The tests check applicable linear precision, both-axis cell/edge continuity, supported-region refinement, CDF discretization, kernel-neighbor oracles, guard support and an isolated uniform control. Deliberate mapping/weight, locator, inverse-table and frozen-mesh faults demonstrate discriminatory power.
The audit found two production defects, filed separately: #609 (partial KNN point block) and #610 (Sibson internal-edge coordinates and near-edge partition). Their regressions execute as strict expected failures. This PR does not repair production code or claim every numerical property passes.
Closes #603 once the linked workspace source-recovery PR also lands.
API Changes
None. Production modules and defaults are unchanged.
Test Plan
Numerical findings
At mesh sizes 16/32/64, maximum CDF roundtrip errors in index units with the default 64 knots were 0.002764 / 0.018877 / 0.101891. With 256 knots they were 0.000211 / 0.001042 / 0.006067; with 1,024 knots, 0.0000125 / 0.0000771 / 0.000311. These results support a separately validated scaling policy, not a default change in this audit.
Adaptive positive support uses flattened rows 2..n-1 and columns 1..n-2; zero-weight stencil entries can reference additional guards. The conventional mesh zeroed-pixel perimeter has different semantics, retained as a documented boundary-condition question rather than conflated with transformed-cell area repair #605.
Readiness
Heart has no RED reasons. Human explicitly acknowledged
manifest drift: workspace checkouts (manifest ↔ disk) — 1 mismatch(es) vs PyAutoMind/repos.yamland stalerelease validation incomplete: no rehearsal for current source, authorizing development PR shipping only. No merge or release is authorized.