Skip to content

Repair what the 'standalone' rename left behind - #134

Merged
oliviermattelaer merged 1 commit into
mainfrom
claude/standalone-rename-fallout
Sep 11, 2026
Merged

oliviermattelaer merged 1 commit into
mainfrom
claude/standalone-rename-fallout

Conversation

@oliviermattelaer

Copy link
Copy Markdown
Contributor

Why

PR #64 renamed the export formats — the Fortran standalone became standalone_fortran, and standalone now names the MadMatrix (C++) output. Those commits are dated 2026-08-11 but sat on feat-big-renaming and only reached main on 2026-09-02 (d7f4f8b21). Every branch written against the old vocabulary in the meantime kept saying standalone and silently changed meaning at the merge. No textual conflict, so git flagged nothing.

What was broken

A user-facing regression. LOOP_INDUCED_FORMATS still named standalone, so for g g > h [noborn=QCD]:

command before after
output standalone_fortran refused ("does not support loop-induced processes") writes the MadLoop directory
output standalone (MadMatrix) KeyError: 5 in export_mg7.set_channels_colors_map refused, pointing at [sqrvirt=]

The Fortran standalone is the format PR #81 taught to accept loop-induced processes, and it is the one with the MadLoop backend; the crash is exactly what the guard in ExportCPPFactory exists to prevent. [sqrvirt=] / [virt=] through the MadLoop interface are untouched (checked by hand and by the tests).

Three tests that named the format.

  • test_loop_induced_output.py asked ExportV4Factory for 'standalone' and asserted a sqrvirt refusal from standalone_cpp, a format removed in ea8593da3. The prefix trap it guards has flipped round — 'standalone' is now the prefix without a loop backend — so that is what it pins now.
  • testIO_FDgauge_standalone_fortran generated a madmatrix directory, which has no Source/DHELAS, so its two reference files stopped being produced. 7840ba898 ("update IOTest", the evening of the Feat big renaming #64 merge) then ran with -U and deleted them. The test has reported OK ever since while comparing nothing. Both files are restored here byte-for-byte (git hash-object matches the blobs deleted in 7840ba898, and they match today's output); tampering one now fails the test again, so it has its detection power back.
  • testIO_loop_induced_standalone_output likewise — see the caveat below.

An order dependency of the same family. testIO_UnitProcOutputIOTests was the only IOTest in its file with no @set_global, so it exported in whatever gauge an earlier test left behind. tests/unit_tests/iolibs/test_ufo_parsers imports a loop model through a MasterCmd, which switches aloha.unitary_gauge to Feynman and never switches it back; loop_sm then keeps the charged Goldstone and get_color.f starts at CASE(-251) instead of the ghost CASE(-82). Pinned on one side, restored on the other.

Two things deliberately left open

  1. testIO_loop_induced_standalone_output fails on this branch. Pointing it at standalone_fortran makes it run for the first time since Feat big renaming #64 (it crashes on main), and it then finds its goldens stale in two independent ways: check_sa.f has a debug CALL ..._COMPUTE_RES_FROM_JAMP that only ever lived on the dropped PR loop-induced: stop the run when the poles do not cancel #80 branch, and loop_matrix.f is missing the KEEP_OFFSHELL_MASS block that reached main on 2026-08-25 — four days after PR loop-induced output: fix standalone, refuse the formats with no MadLoop backend #81 recorded these goldens, and PR loop-induced output: fix standalone, refuse the formats with no MadLoop backend #81 merged on 09-05 without re-recording. Regenerating them is a maintainer call, so this PR does not.
  2. testIO_UnitProcOutputIOTests still fails in a full-suite run, from a different leak the gauge fix does not cover: tests/unit_tests/fks/test_ewsudakov imports loop_qcd_qed_sm_Gmu_forSudakov, and a later import_ufo.import_model('loop_sm') then groups mdl_MW under ('aEWM1', 'Gf') instead of ('aEWM1',), which reorders mp_intparam_definition.inc. Same expression, same externals — only the dependency key changes, and the leaked key is unprefixed (Gf, not mdl_Gf), which points at the shared UFO module registry in models/__init__.py:load_model. Pre-existing and unrelated to the rename.

Why CI did not catch any of it

Testing

  • ./tests/test_manager.py -p U -r 1 test_loop_induced_output — 16/16 green (was 1 failure + 1 error).
  • ./tests/test_manager.py testIO_FDgauge_standalone_fortran testIO_FDgauge_madmatrix -pA -t0 — green, and verified non-vacuous by tampering a reference file.
  • ./tests/test_manager.py -R -F 10 — no MISSING left (was 2).
  • Full ./tests/test_manager.py: 1 failure + 93 errors, down from 3 + 94. The remaining failure is item 2 above; the 93 errors are the pre-existing madspin-density/numpy ones, identical on main.
  • By hand: output standalone_fortran on g g > h [noborn=QCD] writes Cards/MadLoopParams.dat; output standalone refuses; [sqrvirt=] through bare output standalone still writes a MadLoop directory.

🤖 Generated with Claude Code

PR #64 renamed the export formats -- the Fortran standalone became
'standalone_fortran' and 'standalone' now names the MadMatrix (C++) output --
and landed on main on 2026-09-02. Anything written against the old vocabulary
on a branch that merged later kept saying 'standalone' and silently changed
meaning. Git flags none of it; nor did CI, for three separate reasons (see the
PR description).

The user-visible one: LOOP_INDUCED_FORMATS still named 'standalone', so for
`g g > h [noborn=QCD]`

  * `output standalone_fortran` -- the format that does have the MadLoop
    backend, taught to accept loop-induced processes in PR #81 -- was refused;
  * `output standalone` was whitelisted instead and died with `KeyError: 5` in
    export_mg7.set_channels_colors_map, the exact crash the guard in
    ExportCPPFactory exists to prevent.

Both now behave: the Fortran standalone writes its MadLoop directory, and the
MadMatrix one is refused with the message pointing at [sqrvirt=].

The tests that named the format:

  * tests/unit_tests/loop/test_loop_induced_output.py asked ExportV4Factory for
    'standalone' and asserted a `sqrvirt` refusal from 'standalone_cpp', a
    format removed in ea8593d. The prefix trap it guards has flipped round:
    'standalone' is now the prefix *without* a loop backend, so that is what
    the test pins.
  * testIO_FDgauge_standalone_fortran generated a madmatrix directory, which
    has no Source/DHELAS, so its two reference files stopped being produced --
    and `7840ba898` ("update IOTest", the evening of the #64 merge) then ran
    with -U and deleted them. The test kept reporting OK while comparing
    nothing. Restored here byte-for-byte (they match today's output; tampering
    one now fails the test again).
  * testIO_loop_induced_standalone_output likewise. Its goldens are stale for
    reasons of their own and are deliberately left alone, so this test fails
    until they are refreshed -- see the PR description.

Last, an order dependency of the same family: testIO_UnitProcOutputIOTests was
the only IOTest in its file with no @set_global, so it exported in whatever
gauge an earlier test left behind. tests/unit_tests/iolibs/test_ufo_parsers
imports a loop model through a MasterCmd, which switches aloha.unitary_gauge to
Feynman and never switches it back; loop_sm then keeps the charged Goldstone
and get_color.f starts at CASE(-251) instead of the ghost CASE(-82). Pinned on
one side, restored on the other.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oliviermattelaer
oliviermattelaer merged commit c0140a0 into main Sep 11, 2026
513 checks passed
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.

1 participant