Validate compact gravity application probe records

This commit is contained in:
2026-09-17 10:23:43 -04:00
parent 0bf260f04d
commit 01169861c6
4 changed files with 164 additions and 6 deletions

View File

@@ -4,13 +4,16 @@ Run the checker on each completed frozen-probe directory:
```sh
python3 experiments/check_numerical_strategies.py RESULT_FOLDER --require gravity
python3 experiments/check_numerical_strategies.py RESULT_FOLDER --require applications
python3 experiments/check_numerical_strategies.py RESULT_FOLDER --require polynomial
python3 experiments/check_numerical_strategies.py LATE_ROTATING_FOLDER --require polynomial --expect-negative-base
python3 experiments/test_check_numerical_strategies.py
```
Both sections are discovered automatically when their CSV files exist. Repeating
`--require` demands both sections. Exit 0 means the requested checks passed;
Polynomial, gravity-strategy, and gravity-application sections are discovered
automatically when their CSV files exist. Repeating `--require` demands each
named section. Older campaigns without `gravity_applications.csv` remain valid
unless `--require applications` is supplied. Exit 0 means the requested checks passed;
3 means an invariant or numerical expectation failed; 2 means evidence is
incomplete. An honestly reported failed inner solve, unavailable trial, or
unresolved certificate must not turn into a passing verification. Expected
@@ -40,6 +43,26 @@ evidence rather than an automatic claim of a bad Jacobian: the retained-residual
amplification of the remaining gravity error has not been bounded. The recorded
roundoff scales are heuristics, not rigorous forward-error bounds.
When `gravity_applications.csv` is present, every recorded direction must satisfy
compact-versus-root normalized operator agreement and the default fixture's
inverse agreement. The gate matches the real-FEM test:
`error <= 2e-12 * max(1, reference_norm)`, a relative tolerance with an absolute
floor for small actions. Norms, absolute/relative errors, and both application
times must be finite and nonnegative; relative-error columns must also agree
with the absolute measurements. The reported compact/fallback flags must be
valid and consistent across this one prepared subsystem's directions. Fallback
is a valid reported outcome, including for custom recipes. An empty set of
directions or a missing explicitly required file is incomplete evidence.
Inverse equality is an expectation for the default independent material/gravity
recipe used by these fixtures, not a mathematical requirement on every possible
custom compact preconditioner. A custom inverse deliberately different from the
root restriction needs its own comparison expectation; this checker must not
be cited as accepting that difference. Operator equality always remains required
because both paths must apply the same equations and normalization. The JSON
retains the selected paths and separate application times without imposing a
speedup threshold.
This script deliberately does not duplicate physical acceptance. For each
end-to-end model, run `check_plateau_physics.py` on its endpoint. That separate
gate requires recorded strict nonlinear convergence and all eight defined virial
@@ -54,7 +77,7 @@ Use one numerical process at a time and preserve all capped failures as results.
| Layer | Cases | Bound / acceptance |
|---|---|---|
| Algebra and lifecycle | Gravity subsystem, Schur reduction, polynomial certificate tests; one and two MPI ranks | 2 minutes per test group; true-defect, stale-state, empty-local, rollback, type-contract coverage |
| Python checker | Synthetic passing, false-convergence, mutation, missing-data, negative-base, and NaN records | 30 seconds; standard-library unit tests |
| Python checker | Synthetic passing, false-convergence, mutation, missing-data, negative-base, compact/fallback agreement, and NaN records | 30 seconds; standard-library unit tests |
| Positivity frozen states | n=1 J=0.1 captured iteration 2 and iteration 11; a certified seed/control | 10 minutes per probe; iteration 11 must be negative and reject repair with `invalid_base`; no claim that the earlier base is positive before checking it |
| Gravity curvature | n=1.5 J=0 captured iteration 1 | 15 minutes; alpha = 1, 0.1, 0.01, 0.001; gate fresh remainder cancellation and small-step order |
| Reduced gravity | Same n=1.5 state, plus constrained n=3 saved seed direction | 15 minutes per probe; completion and three central-difference pairs; n=3 direction remains an approximate diagnostic correction |