From 29e91adb6273f3d07a83a34ccf62fda02efe67ba Mon Sep 17 00:00:00 2001 From: warriord Date: Mon, 23 Nov 2026 09:00:49 +0100 Subject: [PATCH] The wall cases are checked on the platform of the record On the MA wall the point reached follows the last digit of the platform's arithmetic: the same fit stops at -658.9552 on Linux, -659.2055 on Windows and -659.7980 on macOS (sima's CI). The record was made on Linux x86-64, so the cases with iterations are checked there and skipped elsewhere; otherwise the wheels' tests on macOS and Windows would fail at the release. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01LHFMF7TdsD3zk7vwMvviq3 --- docs/HOMOLOGATION.md | 9 +++++++++ tests/test_bug_0030_as_the_c.py | 12 +++++++++--- tests/test_c_oracle.py | 14 ++++++++++---- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/docs/HOMOLOGATION.md b/docs/HOMOLOGATION.md index eec92dc..d2dafd0 100644 --- a/docs/HOMOLOGATION.md +++ b/docs/HOMOLOGATION.md @@ -68,6 +68,15 @@ are checked with the compiled likelihood and skipped without it. The fallback is a fallback: about a hundred times slower, and not what an analysis should run on. +**On the platform of the record only.** The record was made on Linux +x86-64, C and port. On the wall the point follows the last digit of the +arithmetic, and that digit is the compiler's and the C library's: the same +fit (the flour prices' echelon form, in sima's suite) stops at −658.9552 on +Linux, −659.2055 on Windows and −659.7980 on macOS. So the cases with +iterations are checked on Linux x86-64 and skipped elsewhere. Whether the +port and the C agree with each other on macOS or Windows has not been +measured: the C has only been run on Linux for this record. + ## When the C changes 1. Build the C at the new commit and run the port's suite with `ATSW_GUI` diff --git a/tests/test_bug_0030_as_the_c.py b/tests/test_bug_0030_as_the_c.py index d30fccc..4e0372c 100644 --- a/tests/test_bug_0030_as_the_c.py +++ b/tests/test_bug_0030_as_the_c.py @@ -94,13 +94,19 @@ def test_the_cast_does_not_take_the_reciprocal_of_an_ma1(): def _kernel(): + import platform + import sys from drvarma import _engine - return _engine.engine_backend() == "c" + # ...and on the platform the record was made on: on the wall the point + # is the path's, and the path follows the last digit of each platform's + # arithmetic (HOMOLOGATION.md) + return (_engine.engine_backend() == "c" and sys.platform.startswith("linux") + and platform.machine() in ("x86_64", "AMD64")) @needs_fue -@pytest.mark.skipif(not _kernel(), reason="on the MA wall the path is the compiled " - "likelihood's; the pure-Python fallback agrees with it to rounding only") +@pytest.mark.skipif(not _kernel(), reason="on the MA wall the point is the path's: checked " + "with the compiled likelihood, on Linux x86-64") def test_on_the_ma_wall_the_port_ends_where_the_c_does(): """GS1 + FF, VARMA(1,1), route V: the C stops on the invertibility wall at -1740.636683 after 62 iterations from zero and at -1740.622890 after diff --git a/tests/test_c_oracle.py b/tests/test_c_oracle.py index bd0aab2..7ec396d 100644 --- a/tests/test_c_oracle.py +++ b/tests/test_c_oracle.py @@ -50,8 +50,14 @@ def _c_bin(): def _kernel(): """Is the compiled likelihood (the C's elf, in the wheel) the one in use?""" + import platform + import sys from drvarma import _engine - return _engine.engine_backend() == "c" + # ...and on the platform the record was made on: on the wall the point + # is the path's, and the path follows the last digit of each platform's + # arithmetic (HOMOLOGATION.md) + return (_engine.engine_backend() == "c" and sys.platform.startswith("linux") + and platform.machine() in ("x86_64", "AMD64")) def _port_kwargs(d): @@ -71,9 +77,9 @@ def test_the_record_names_a_commit(): @pytest.mark.parametrize("case", REC["cases"], ids=IDS) def test_the_port_gives_the_recorded_number(case): if "nit" in case and not _kernel(): - pytest.skip("a stop on the MA wall is reached only by the same path, and the " - "path is the compiled likelihood's: the pure-Python fallback agrees " - "with it to rounding, which is not enough there (docs/HOMOLOGATION.md)") + pytest.skip("a stop on the MA wall is reached only by the same path: checked with " + "the compiled likelihood, on Linux x86-64, where the record was made " + "(docs/HOMOLOGATION.md)") files = [os.path.join(D, os.path.basename(f)) for f in case["files"]] L = Ladder(files, **_port_kwargs(case["port"])) r = L.fit()