Repository navigation
Repair what the 'standalone' rename left behind - #134
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
PR #64 renamed the export formats — the Fortran standalone became
standalone_fortran, andstandalonenow names the MadMatrix (C++) output. Those commits are dated 2026-08-11 but sat onfeat-big-renamingand only reached main on 2026-09-02 (d7f4f8b21). Every branch written against the old vocabulary in the meantime kept sayingstandaloneand silently changed meaning at the merge. No textual conflict, so git flagged nothing.What was broken
A user-facing regression.
LOOP_INDUCED_FORMATSstill namedstandalone, so forg g > h [noborn=QCD]:output standalone_fortranoutput standalone(MadMatrix)KeyError: 5inexport_mg7.set_channels_colors_map[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
ExportCPPFactoryexists 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.pyaskedExportV4Factoryfor'standalone'and asserted asqrvirtrefusal fromstandalone_cpp, a format removed inea8593da3. 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_fortrangenerated a madmatrix directory, which has noSource/DHELAS, so its two reference files stopped being produced.7840ba898("update IOTest", the evening of the Feat big renaming #64 merge) then ran with-Uand deleted them. The test has reported OK ever since while comparing nothing. Both files are restored here byte-for-byte (git hash-objectmatches the blobs deleted in7840ba898, and they match today's output); tampering one now fails the test again, so it has its detection power back.testIO_loop_induced_standalone_outputlikewise — see the caveat below.An order dependency of the same family.
testIO_UnitProcOutputIOTestswas 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_parsersimports a loop model through aMasterCmd, which switchesaloha.unitary_gaugeto Feynman and never switches it back;loop_smthen keeps the charged Goldstone andget_color.fstarts atCASE(-251)instead of the ghostCASE(-82). Pinned on one side, restored on the other.Two things deliberately left open
testIO_loop_induced_standalone_outputfails on this branch. Pointing it atstandalone_fortranmakes 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.fhas a debugCALL ..._COMPUTE_RES_FROM_JAMPthat only ever lived on the dropped PR loop-induced: stop the run when the poles do not cancel #80 branch, andloop_matrix.fis missing theKEEP_OFFSHELL_MASSblock 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.testIO_UnitProcOutputIOTestsstill fails in a full-suite run, from a different leak the gauge fix does not cover:tests/unit_tests/fks/test_ewsudakovimportsloop_qcd_qed_sm_Gmu_forSudakov, and a laterimport_ufo.import_model('loop_sm')then groupsmdl_MWunder('aEWM1', 'Gf')instead of('aEWM1',), which reordersmp_intparam_definition.inc. Same expression, same externals — only the dependency key changes, and the leaked key is unprefixed (Gf, notmdl_Gf), which points at the shared UFO module registry inmodels/__init__.py:load_model. Pre-existing and unrelated to the rename.Why CI did not catch any of it
cancel-in-progressis keyed on the ref and main is a ref like any other: of the last 25 IOtest runs on main, 9 were cancelled — loop-induced output: fix standalone, refuse the formats with no MadLoop backend #81 and fix: keep loop_Nc_power out of the process-wide colour memo #84 landed 9 s apart, madspace: bind LHEEvent.alpha_qcd to the right member #87/madspace: spell the LHEParticle momentum kwargs like its attributes (px/py/pz) #88 21 s apart, Cheaper colour sum: DDM colour basis, Kleiss-Kuijf flows, and the same for madmatrix #60 was killed by CI: stop the xsec and madspace workflows running twice per push #129 36 s later. The post-merge run is the only one that sees the merged tree, which is where this class of conflict lives.unittest.ymlruns a hand-maintained list of test names, not the suite. PR loop-induced output: fix standalone, refuse the formats with no MadLoop backend #81's two loop-induced tests are in no workflow at all — they have never run in CI.IOTests.pyonly prompts interactively; otherwise the test degrades to comparing nothing and reports OK. Only./tests/test_manager.py -R -F 10lists them as MISSING.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)../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.output standalone_fortranong g > h [noborn=QCD]writesCards/MadLoopParams.dat;output standalonerefuses;[sqrvirt=]through bareoutput standalonestill writes a MadLoop directory.🤖 Generated with Claude Code