Skip to content

Commit 897ed45

Browse files
committed
Compare second-review replays with the bundle tolerance policy
second-review-checks.py asserted exact JSON equality between replayed and saved probe output, which fails on Python 3.12 and on CPython builds other than the one that wrote the JSON. It now uses check.mismatches, the same per-leaf tolerance policy check.py applies (rel_tol 1e-7 and the named diagnostic bounds), and reports every mismatch. The independent formula checks are unchanged. Before: AssertionError at the replay on Python 3.12.16 and 3.14.9. After: exit 0 on both, with NumPy 2.5.4, SciPy 1.18.1, SymPy 1.14.0. publication-manifest.json records the new script hash under publication_files and lists the change. The original_research_artifacts entry keeps the reviewed hash. Addresses item 2 of proof review 5907254464 on #11. Signed-off-by: Orda <342776047+orda-aska@users.noreply.github.com>
1 parent 2fd7c77 commit 897ed45

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

‎research/value-assessment-20261112/publication-manifest.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
},
238238
{
239239
"path": "second-review-checks.py",
240-
"sha256": "676379e8f089f725a79f9bd92a64de52e9a218d3af08d03de09102d7abc64483"
240+
"sha256": "f917eb701769f6fdff372330ed4f4582a5ff4494e1066fe2ec011618087166ce"
241241
},
242242
{
243243
"path": "second-review.md",
@@ -270,6 +270,7 @@
270270
"Rank-one and pentamode prior art plus unimode distinction",
271271
"Link analytic future-expansion bound from independent review",
272272
"Portable reproduction runner, focused workflow, synthesis and companion notes",
273-
"Exclude source-paper caches and machine-specific build logs"
273+
"Exclude source-paper caches and machine-specific build logs",
274+
"Portable second-review replay comparison using the bundle tolerance policy"
274275
]
275276
}

‎research/value-assessment-20261112/second-review-checks.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Replays their scripts only in temporary copies and tests the central formulas
44
using separate Bessel expansions, quadrature, and symbolic differentiation.
5+
Replayed JSON is compared with the bundle checker's tolerance policy
6+
(check.mismatches), so the replay is portable across CPython builds.
57
"""
68
from pathlib import Path
79
import hashlib
@@ -10,6 +12,7 @@
1012
import shutil
1113
import subprocess
1214
import sys
15+
import importlib.util
1316
import tempfile
1417

1518
import numpy as np
@@ -21,6 +24,15 @@
2124
ROOT=Path(__file__).resolve().parent
2225

2326

27+
def bundle_checker():
28+
# check.py is the bundle runner, not an author probe; only its comparison
29+
# policy is used here.
30+
spec=importlib.util.spec_from_file_location('value_assessment_check',ROOT/'check.py')
31+
module=importlib.util.module_from_spec(spec)
32+
spec.loader.exec_module(module)
33+
return module
34+
35+
2436
def checks_closure():
2537
eps=.02; ell=.2
2638
# Jacobi-Anger expansion, independent of the source's initial-data FFT.
@@ -155,7 +167,8 @@ def replay():
155167
assert run.returncode==0,run.stderr
156168
actual=json.loads((runpath/'results.json').read_text())
157169
saved=json.loads((ROOT/folder/'results.json').read_text())
158-
assert actual==saved
170+
errors=bundle_checker().mismatches(actual,saved,folder)
171+
assert not errors,'\n'.join(errors)
159172
rows.append({'probe':folder+'/'+script,'exit_code':run.returncode,
160173
'all_saved_JSON_values_match_replay':True})
161174
return rows

0 commit comments

Comments
 (0)