From 162aaafef76362fd072033086fa3712e3c6999ba Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sat, 19 Sep 2026 09:25:42 +0200 Subject: [PATCH] tools/battery: -A where XDS kept Friedel mates apart On the XDS-referenced arms rugnux merges Friedel mates separately whenever XDS ran with FRIEDEL'S_LAW=FALSE, in forced and unforced mode alike, so the merging statistics compare like with like. Co-Authored-By: Claude Opus 5 (1M context) --- tools/battery/README.md | 2 ++ tools/battery/battery.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/tools/battery/README.md b/tools/battery/README.md index 6b31188fa..628c9d785 100644 --- a/tools/battery/README.md +++ b/tools/battery/README.md @@ -245,6 +245,8 @@ reproduces A was really changed by B. processing better than XDS's, reflection for reflection". `--unforced` leaves rugnux its own cut, which answers "what does a user get". A change can win one and lose the other, so at important moments run both. Never quote the forced run as what rugnux delivers. + Where XDS merged with `FRIEDEL'S_LAW=FALSE` (`"anomalous": true` in the manifest), rugnux gets + `-A` in both modes, so Friedel mates are merged separately on both sides. ### The XDS reference d_min diff --git a/tools/battery/battery.py b/tools/battery/battery.py index b369d949e..7fd9f48d3 100644 --- a/tools/battery/battery.py +++ b/tools/battery/battery.py @@ -167,6 +167,10 @@ def command(binary, e, opts): cmd += ["--scaling-high-resolution", f"{ref['dmin']:.3f}"] if ref.get("dmax"): cmd += ["--scaling-low-resolution", f"{ref['dmax']:.3f}"] + # XDS merged with FRIEDEL'S_LAW=FALSE: merge Friedel mates separately too, or the merging + # statistics are not comparable + if e.get("reference") == "xds" and ref.get("anomalous"): + cmd.append("-A") cmd += opts["extra_args"] cmd.append(e["input_path"]) if opts["gpulock"]: