Skip to content

test: Audit numerical invariants across every mesh interpolator - #611

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/mesh-interpolator-numerics-audit
Oct 2, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/mesh-interpolator-numerics-audit

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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

  • Full PyAutoArray suite before the final audit-only extensions: 1,940 passed, 1 strict xfailed, 0 unexpected failures, exit 0.
  • Final focused interpolation suite: 90 passed, 4 strict xfailed, 0 unexpected failures, 46.74 seconds; covers every final audit test addition.
  • Workspace source-recovery smoke: 1 passed, 0 failed, 8.27 seconds under the actual smoke profile/runner. Compares solved coefficients with independent analytic physical truth for all six classes and rejects deliberately corrupted mappings; unchanged uniform control is bit-identical.
  • No new JAX tests are added to the NumPy library suite; optional KNN cases skip when JAX is unavailable because production KNN requires it.

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.yaml and stale release validation incomplete: no rehearsal for current source, authorizing development PR shipping only. No merge or release is authorized.

@Jammy2211

Copy link
Copy Markdown
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.

@Jammy2211
Jammy2211 merged commit 2566456 into main Oct 2, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/mesh-interpolator-numerics-audit branch October 2, 2026 11:45
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
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.

test: Audit numerical correctness of every mesh interpolator

1 participant