From 28b32f15ccaac2d8389e4e60a34a2338c578af9b Mon Sep 17 00:00:00 2001 From: Matthew James Briggs Date: Sun, 21 Jun 2026 10:17:05 +0000 Subject: [PATCH 1/6] test: register segno/coda synthetic fixtures in the api file-walking suite Closes #204. Registers segno.{3.0,3.1}.xml and coda.{3.0,3.1}.xml (under data/synthetic/) in MxFileRepository::initializeNameSubdirectoryMap() so the api file-walking suite (ApiLoadSurvivalTest) exercises the public DocumentManager read path over them. The 3.1 variants additionally carry id and smufl; all four load and yield a part. segno/coda write fidelity is already covered at the impl layer by the segnoAndCodaRoundTrip DirectionWriter test (#203). --- src/private/mxtest/file/MxFileRepositoy.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/private/mxtest/file/MxFileRepositoy.cpp b/src/private/mxtest/file/MxFileRepositoy.cpp index 5792bdd1..302fe955 100644 --- a/src/private/mxtest/file/MxFileRepositoy.cpp +++ b/src/private/mxtest/file/MxFileRepositoy.cpp @@ -467,5 +467,11 @@ void MxFileRepository::initializeNameSubdirectoryMap() // mxl myNameSubdirectoryMap.emplace("Dichterliebe01.mxl", "mxl"); + + // synthetic (audit-generated single-feature fixtures) + myNameSubdirectoryMap.emplace("segno.3.0.xml", "synthetic"); + myNameSubdirectoryMap.emplace("segno.3.1.xml", "synthetic"); + myNameSubdirectoryMap.emplace("coda.3.0.xml", "synthetic"); + myNameSubdirectoryMap.emplace("coda.3.1.xml", "synthetic"); } } // namespace mxtest From 8121c1f888f2325ff32542149417a8aa0ba5ac5b Mon Sep 17 00:00:00 2001 From: Matthew James Briggs Date: Sun, 21 Jun 2026 12:06:22 +0000 Subject: [PATCH 2/6] test: pin segno/coda fixtures in the api read->write->read gate Adds dedicated minimal fixtures custom/segno_coda_roundtrip.{3.0,3.1}.xml that isolate the segno/coda surface (3.0 base attributes; 3.1 adds id + smufl) in a score that round-trips losslessly through the public DocumentManager createFromFile -> getData -> createFromScore -> writeToStream path, and pins them in roundtrip-baseline.txt so the test-api-roundtrip CI gate enforces strict DOM-equal read->write->read for segno and coda. The audit synthetic/segno.*.xml and synthetic/coda.*.xml probes cannot serve this gate: they carry editorial part-group/direction children (footnote/level/voice) the api omits and have no notes (so the api synthesizes ), diverging for reasons unrelated to segno/coda. Those remain covered for load survival via the file-walking suite (previous commit). Also registers the two fixtures in MxFileRepository and adds their audit *.features.xml sidecars. --- .../segno_coda_roundtrip.3.0.features.xml | 107 +++++++++++++++++ data/custom/segno_coda_roundtrip.3.0.xml | 36 ++++++ .../segno_coda_roundtrip.3.1.features.xml | 111 ++++++++++++++++++ data/custom/segno_coda_roundtrip.3.1.xml | 36 ++++++ src/private/mxtest/api/roundtrip-baseline.txt | 10 ++ src/private/mxtest/file/MxFileRepositoy.cpp | 2 + 6 files changed, 302 insertions(+) create mode 100644 data/custom/segno_coda_roundtrip.3.0.features.xml create mode 100644 data/custom/segno_coda_roundtrip.3.0.xml create mode 100644 data/custom/segno_coda_roundtrip.3.1.features.xml create mode 100644 data/custom/segno_coda_roundtrip.3.1.xml diff --git a/data/custom/segno_coda_roundtrip.3.0.features.xml b/data/custom/segno_coda_roundtrip.3.0.features.xml new file mode 100644 index 00000000..6f53e1dd --- /dev/null +++ b/data/custom/segno_coda_roundtrip.3.0.features.xml @@ -0,0 +1,107 @@ + + + + custom/segno_coda_roundtrip.3.0.xml + 3.0 + + + attributes + + + coda + + color + default-x + default-y + font-family + font-size + font-style + font-weight + halign + relative-x + relative-y + valign + + + + direction + + + direction-type + + + divisions + + + duration + + + measure + + number + + + + note + + + octave + + + part + + id + + + + part-list + + + part-name + + + pitch + + + score-part + + id + + + + score-partwise + + version + + + + segno + + color + default-x + default-y + font-family + font-size + font-style + font-weight + halign + relative-x + relative-y + valign + + + + staff + + + step + + + type + + + voice + + + diff --git a/data/custom/segno_coda_roundtrip.3.0.xml b/data/custom/segno_coda_roundtrip.3.0.xml new file mode 100644 index 00000000..3dfc2198 --- /dev/null +++ b/data/custom/segno_coda_roundtrip.3.0.xml @@ -0,0 +1,36 @@ + + + + + x + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + C + 4 + + 1 + 1 + quarter + + + + diff --git a/data/custom/segno_coda_roundtrip.3.1.features.xml b/data/custom/segno_coda_roundtrip.3.1.features.xml new file mode 100644 index 00000000..0f8e9325 --- /dev/null +++ b/data/custom/segno_coda_roundtrip.3.1.features.xml @@ -0,0 +1,111 @@ + + + + custom/segno_coda_roundtrip.3.1.xml + 3.0 + + + attributes + + + coda + + color + default-x + default-y + font-family + font-size + font-style + font-weight + halign + id + relative-x + relative-y + smufl + valign + + + + direction + + + direction-type + + + divisions + + + duration + + + measure + + number + + + + note + + + octave + + + part + + id + + + + part-list + + + part-name + + + pitch + + + score-part + + id + + + + score-partwise + + version + + + + segno + + color + default-x + default-y + font-family + font-size + font-style + font-weight + halign + id + relative-x + relative-y + smufl + valign + + + + staff + + + step + + + type + + + voice + + + diff --git a/data/custom/segno_coda_roundtrip.3.1.xml b/data/custom/segno_coda_roundtrip.3.1.xml new file mode 100644 index 00000000..f40a3123 --- /dev/null +++ b/data/custom/segno_coda_roundtrip.3.1.xml @@ -0,0 +1,36 @@ + + + + + x + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + C + 4 + + 1 + 1 + quarter + + + + diff --git a/src/private/mxtest/api/roundtrip-baseline.txt b/src/private/mxtest/api/roundtrip-baseline.txt index 176f4138..473bae59 100644 --- a/src/private/mxtest/api/roundtrip-baseline.txt +++ b/src/private/mxtest/api/roundtrip-baseline.txt @@ -59,3 +59,13 @@ lysuite/ly46f_IncompleteMeasures.xml lysuite/ly71a_Chordnames.xml lysuite/ly72a_TransposingInstruments.xml lysuite/ly72b_TransposingInstruments_Full.xml + +# Dedicated segno/coda api read->write->read fixtures (#204). The audit's +# synthetic/segno.*.xml and synthetic/coda.*.xml probes carry editorial +# part-group/direction children (footnote/level/voice) and no notes, so the +# api -- which omits those and synthesizes -- cannot round-trip +# them through the strict DOM compare for reasons unrelated to segno/coda. +# These two fixtures isolate the segno/coda surface (3.0 base attributes; 3.1 +# adds id + smufl) in a minimal score that round-trips losslessly. +custom/segno_coda_roundtrip.3.0.xml +custom/segno_coda_roundtrip.3.1.xml diff --git a/src/private/mxtest/file/MxFileRepositoy.cpp b/src/private/mxtest/file/MxFileRepositoy.cpp index 302fe955..56187ca1 100644 --- a/src/private/mxtest/file/MxFileRepositoy.cpp +++ b/src/private/mxtest/file/MxFileRepositoy.cpp @@ -464,6 +464,8 @@ void MxFileRepository::initializeNameSubdirectoryMap() myNameSubdirectoryMap.emplace("musescore-slur-start-stop.musicxml", "custom"); myNameSubdirectoryMap.emplace("systems-and-pages.xml", "custom"); myNameSubdirectoryMap.emplace("transposition.musicxml", "custom"); + myNameSubdirectoryMap.emplace("segno_coda_roundtrip.3.0.xml", "custom"); + myNameSubdirectoryMap.emplace("segno_coda_roundtrip.3.1.xml", "custom"); // mxl myNameSubdirectoryMap.emplace("Dichterliebe01.mxl", "mxl"); From 374efd1ff78294c28061802da4ec42d5edc06782 Mon Sep 17 00:00:00 2001 From: Matthew James Briggs Date: Sun, 21 Jun 2026 12:32:53 +0000 Subject: [PATCH 3/6] test: bump pinned corpus count 829 -> 831 for new segno/coda fixtures The two custom/segno_coda_roundtrip.{3.0,3.1}.xml fixtures are eligible corpus files, so the corert pinned-counts case (intentionally fails on count drift) must be updated. Both round-trip through mx::core cleanly (832 corert cases pass). Also regenerates the audit data/corpus.xml aggregate (831 total, 442 wild) via 'python3 -m audit all'. --- data/corpus.xml | 336 +++++++++--------- .../mxtest/corert/CoreRoundtripTest.cpp | 4 +- 2 files changed, 172 insertions(+), 168 deletions(-) diff --git a/data/corpus.xml b/data/corpus.xml index eaf20179..26fe6372 100644 --- a/data/corpus.xml +++ b/data/corpus.xml @@ -4,21 +4,23 @@ usage (descending). Do not edit by hand; regenerate with the tool. --> - + - + - + - + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -28,9 +30,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -424,12 +424,14 @@ synthetic/work-title.3.0.xml - + - + - + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -439,9 +441,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -835,9 +835,11 @@ synthetic/work-title.3.0.xml - - + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -847,9 +849,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -1243,7 +1243,7 @@ synthetic/work-title.3.0.xml - + @@ -1257,8 +1257,10 @@ - + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -1268,9 +1270,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -1664,12 +1664,14 @@ synthetic/work-title.3.0.xml - + - + - + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -1679,9 +1681,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -2075,12 +2075,14 @@ synthetic/work-title.3.0.xml - + - + - + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -2090,9 +2092,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -2486,9 +2486,11 @@ synthetic/work-title.3.0.xml - - + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -2498,9 +2500,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/cancel.location.3.0.xml @@ -2514,9 +2514,11 @@ synthetic/suffix.3.0.xml - - + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -2526,9 +2528,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/beat-repeat.3.0.xml @@ -2569,9 +2569,11 @@ synthetic/transpose.3.1.xml - - + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -2581,9 +2583,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/cancel.location.3.0.xml @@ -2591,7 +2591,7 @@ synthetic/key-accidental.smufl.3.1.xml - + @@ -2615,8 +2615,10 @@ - + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -2626,9 +2628,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -2851,6 +2851,31 @@ synthetic/work-title.3.0.xml + + + + + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml + custom/systems-and-pages.xml + custom/transposition.musicxml + foundsuite/12 Horn Duets.xml + foundsuite/ARBEAU Belle qui tiens ma vie.xml + foundsuite/Adagio and Fugue in C minor, K.546.xml + foundsuite/An Chloe.xml + foundsuite/Berlioz_Le_Corsaire.xml + foundsuite/Black Note Study Op 10 no 5.xml + foundsuite/Deutscher Tanz D.820.1.xml + + + + synthetic/cancel.location.3.0.xml + synthetic/key-accidental.3.0.xml + synthetic/key-accidental.smufl.3.1.xml + + @@ -2939,31 +2964,6 @@ synthetic/part-clef.4.0.xml - - - - - - custom/musescore-slur-start-stop.musicxml - custom/systems-and-pages.xml - custom/transposition.musicxml - foundsuite/12 Horn Duets.xml - foundsuite/ARBEAU Belle qui tiens ma vie.xml - foundsuite/Adagio and Fugue in C minor, K.546.xml - foundsuite/An Chloe.xml - foundsuite/Berlioz_Le_Corsaire.xml - foundsuite/Black Note Study Op 10 no 5.xml - foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - - - - synthetic/cancel.location.3.0.xml - synthetic/key-accidental.3.0.xml - synthetic/key-accidental.smufl.3.1.xml - - @@ -3067,9 +3067,11 @@ synthetic/time.3.1.xml - - + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -3079,9 +3081,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -3304,9 +3304,11 @@ synthetic/work-title.3.0.xml - - + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -3316,9 +3318,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -3541,9 +3541,11 @@ synthetic/work-title.3.0.xml - - + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -3553,9 +3555,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -3778,9 +3778,11 @@ synthetic/work-title.3.0.xml - - + + custom/musescore-slur-start-stop.musicxml + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml custom/systems-and-pages.xml custom/transposition.musicxml foundsuite/12 Horn Duets.xml @@ -3790,9 +3792,7 @@ foundsuite/Berlioz_Le_Corsaire.xml foundsuite/Black Note Study Op 10 no 5.xml foundsuite/Deutscher Tanz D.820.1.xml - foundsuite/Invention 1.xml - foundsuite/Invention 2.xml - + synthetic/accent.3.0.xml @@ -4849,14 +4849,16 @@ synthetic/dot.3.0.xml - + - + + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml foundsuite/12 Horn Duets.xml foundsuite/Adagio and Fugue in C minor, K.546.xml foundsuite/An Chloe.xml @@ -4867,9 +4869,7 @@ foundsuite/Moments Musicaux Op16 No4.xml foundsuite/PepAiraSco.xml foundsuite/PezR44Sco.xml - foundsuite/Rimsky-Korsakov Op11 No4.xml - foundsuite/RonCLunSco.xml - + synthetic/accordion-registration.3.0.xml @@ -4965,11 +4965,13 @@ synthetic/words.3.1.xml - + - + + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml foundsuite/12 Horn Duets.xml foundsuite/Adagio and Fugue in C minor, K.546.xml foundsuite/An Chloe.xml @@ -4980,9 +4982,7 @@ foundsuite/Moments Musicaux Op16 No4.xml foundsuite/PepAiraSco.xml foundsuite/PezR44Sco.xml - foundsuite/Rimsky-Korsakov Op11 No4.xml - foundsuite/RonCLunSco.xml - + synthetic/accordion-registration.3.0.xml @@ -5775,8 +5775,10 @@ synthetic/word-font.3.0.xml - - + + + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml foundsuite/ARBEAU Belle qui tiens ma vie.xml foundsuite/An Chloe.xml foundsuite/Black Note Study Op 10 no 5.xml @@ -5787,9 +5789,7 @@ foundsuite/Invention_10.xml foundsuite/Invention_11.xml foundsuite/Invention_12.xml - foundsuite/Invention_13.xml - foundsuite/Invention_14.xml - + synthetic/accent.3.0.xml @@ -10341,6 +10341,34 @@ + + + + + + + + + + + + + + + + + + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml + lysuite/ly21f_Chord_ElementInBetween.xml + lysuite/ly31a_Directions.xml + musuite/testDalSegno.xml + + + synthetic/segno.3.0.xml + synthetic/segno.3.1.xml + + ksuite/k007a_Notations_Dynamics.xml @@ -10453,6 +10481,33 @@ synthetic/accidental-text.3.1.xml + + + + + + + + + + + + + + + + + + custom/segno_coda_roundtrip.3.0.xml + custom/segno_coda_roundtrip.3.1.xml + lysuite/ly31a_Directions.xml + musuite/testDCalCoda.xml + + + synthetic/coda.3.0.xml + synthetic/coda.3.1.xml + + mjbsuite/krz_v40.xml @@ -11156,32 +11211,6 @@ - - - - - - - - - - - - - - - - - - lysuite/ly21f_Chord_ElementInBetween.xml - lysuite/ly31a_Directions.xml - musuite/testDalSegno.xml - - - synthetic/segno.3.0.xml - synthetic/segno.3.1.xml - - @@ -11257,31 +11286,6 @@ synthetic/accordion-registration.3.1.xml - - - - - - - - - - - - - - - - - - lysuite/ly31a_Directions.xml - musuite/testDCalCoda.xml - - - synthetic/coda.3.0.xml - synthetic/coda.3.1.xml - - diff --git a/src/private/mxtest/corert/CoreRoundtripTest.cpp b/src/private/mxtest/corert/CoreRoundtripTest.cpp index ce3040a6..f673e30b 100644 --- a/src/private/mxtest/corert/CoreRoundtripTest.cpp +++ b/src/private/mxtest/corert/CoreRoundtripTest.cpp @@ -127,12 +127,12 @@ const CoreRoundtripRegistrar g_coreRoundtripRegistrar; } // namespace -// Pinned counts: 829 eligible files, none skipped. Count drift is a failure +// Pinned counts: 831 eligible files, none skipped. Count drift is a failure // even with zero individual fails, so a corpus or version-gate change is a // conscious decision, not silent decay. Registered last (registration is // discovery order; "zz" keeps it last alphabetically for shuffled runs too). TEST_CASE("zz-corert-pinned-counts", "[core-roundtrip]") { - CHECK(mxtest::corert::discoverInputFiles().size() == 829); + CHECK(mxtest::corert::discoverInputFiles().size() == 831); CHECK(g_skippedCount == 0); } From 56a76019fb0f1658a10b4c046038aa2e7828296e Mon Sep 17 00:00:00 2001 From: Matthew James Briggs Date: Mon, 22 Jun 2026 06:00:07 +0000 Subject: [PATCH 4/6] docs: corpus-file invariants; rename load-survival to smoke test Renames ApiLoadSurvivalTest -> ApiLoadSmokeTest (class, file, display name) and documents that it only proves a file imports without crashing, not that the data is correct -- the read->write->read gate is the correctness check. Also adds, in the fewest lines possible, the data/ corpus invariants that bit this PR's CI: adding/removing a corpus file requires bumping the CoreRoundtripTest.cpp pinned count and running 'make audit', and 'make check' is clang-format only. --- AGENTS.md | 8 ++++---- ...ApiLoadSurvivalTest.cpp => ApiLoadSmokeTest.cpp} | 13 ++++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) rename src/private/mxtest/api/{ApiLoadSurvivalTest.cpp => ApiLoadSmokeTest.cpp} (70%) diff --git a/AGENTS.md b/AGENTS.md index c97defa6..aa426a1b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -100,10 +100,10 @@ What you need to know right now is that `gen/cpp` is where our MusicXML types ar ## Quality gates -Run `make fmt` for a stable version of clang format. -Run `make check` to see if you will pass in CI -Run `make test-core-dev` to run the `corert` tests, especially if you are working in `mx/core`. -Run `make test` to run all the tests. (Slow and heavy on the local machine) +Run `make fmt` to format. `make check` is the clang-format gate **only** — it builds and tests nothing. +Run `make test-core-dev` for corert (especially `mx/core` work); `make test` for everything (slow). +Adding/removing a `data/` file: bump the pinned count in `CoreRoundtripTest.cpp`, run `make audit` (regenerates `corpus.xml` + `*.features.xml`), confirm round-trip via `make test-core-dev`. +`ApiLoadSmokeTest` proves a file imports without crashing, not that the data is correct; the read→write→read gate (`make test-api-roundtrip` / `roundtrip-baseline.txt`) is the correctness check — pin a fixture there to defend a feature. Look at what will run in CI `.github/workflows/ci.yaml` and anticipate issues there when coding locally. diff --git a/src/private/mxtest/api/ApiLoadSurvivalTest.cpp b/src/private/mxtest/api/ApiLoadSmokeTest.cpp similarity index 70% rename from src/private/mxtest/api/ApiLoadSurvivalTest.cpp rename to src/private/mxtest/api/ApiLoadSmokeTest.cpp index 7d3fcee3..76beebeb 100644 --- a/src/private/mxtest/api/ApiLoadSurvivalTest.cpp +++ b/src/private/mxtest/api/ApiLoadSmokeTest.cpp @@ -12,11 +12,14 @@ namespace mxtest { -class ApiLoadSurvivalTest : public mxtest::MxFileTest +// Smoke test: proves each registered file imports (createFromFile -> getData +// yields a part), NOT that the data is correct -- dropped or mistranslated +// elements still pass. Fidelity is the round-trip gate (roundtrip-baseline.txt). +class ApiLoadSmokeTest : public mxtest::MxFileTest { public: - ApiLoadSurvivalTest(mxtest::MxFile inTestFile, std::string inTestName, std::string inTestCppFileName, - int inTestCppFileLineNumber) + ApiLoadSmokeTest(mxtest::MxFile inTestFile, std::string inTestName, std::string inTestCppFileName, + int inTestCppFileLineNumber) : mxtest::MxFileTest(inTestFile, inTestName, inTestCppFileName, inTestCppFileLineNumber) { } @@ -51,8 +54,8 @@ class ApiLoadSurvivalTest : public mxtest::MxFileTest } }; -MxFileTestGroup instance{MX_COMPILE_MAX_FILE_SIZE_BYTES, // maxFileSizeBytes - "Api Load Survival Test", __FILE__, __LINE__}; +MxFileTestGroup instance{MX_COMPILE_MAX_FILE_SIZE_BYTES, // maxFileSizeBytes + "Api Load Smoke Test", __FILE__, __LINE__}; } // namespace mxtest #endif From 1a251676b9a2ec217132cddec785b85537e896bf Mon Sep 17 00:00:00 2001 From: Matthew James Briggs Date: Mon, 22 Jun 2026 06:00:14 +0000 Subject: [PATCH 5/6] test: give segno/coda fixtures distinct non-default attribute values Per review: every numeric/color attribute now carries a distinct, non-default value (default-x=1.1, default-y=2.2, relative-x=3.3, relative-y=4.4, font-size differs per element, color=#12345678 / #9ABCDEF0, halign/valign differ) so a writer or reader that assigns a value to the wrong attribute is caught instead of hiding behind uniform 1s and #FF000000. Colors are uppercase per the MusicXML color schema type. Both variants still round-trip exactly. --- data/custom/segno_coda_roundtrip.3.0.xml | 4 ++-- data/custom/segno_coda_roundtrip.3.1.xml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/custom/segno_coda_roundtrip.3.0.xml b/data/custom/segno_coda_roundtrip.3.0.xml index 3dfc2198..96e8b888 100644 --- a/data/custom/segno_coda_roundtrip.3.0.xml +++ b/data/custom/segno_coda_roundtrip.3.0.xml @@ -12,13 +12,13 @@ - + 1 - + 1 diff --git a/data/custom/segno_coda_roundtrip.3.1.xml b/data/custom/segno_coda_roundtrip.3.1.xml index f40a3123..53c8a0ce 100644 --- a/data/custom/segno_coda_roundtrip.3.1.xml +++ b/data/custom/segno_coda_roundtrip.3.1.xml @@ -1,5 +1,5 @@ - + x @@ -12,13 +12,13 @@ - + 1 - + 1 From 2db60282d4c27dfeca396acc1ca70bbf4f68ab98 Mon Sep 17 00:00:00 2001 From: Matthew James Briggs Date: Mon, 22 Jun 2026 18:38:42 +0000 Subject: [PATCH 6/6] docs: clarify api smoke-test and segno/coda fixture comments Address review feedback: reword the ApiLoadSmokeTest comment so it no longer says the import 'yields a part' (it asserts a non-empty parts list), and trim the segno/coda baseline comment to state what the fixtures are rather than transitory context about other files. --- src/private/mxtest/api/ApiLoadSmokeTest.cpp | 7 ++++--- src/private/mxtest/api/roundtrip-baseline.txt | 10 +++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/private/mxtest/api/ApiLoadSmokeTest.cpp b/src/private/mxtest/api/ApiLoadSmokeTest.cpp index 76beebeb..feba0bf3 100644 --- a/src/private/mxtest/api/ApiLoadSmokeTest.cpp +++ b/src/private/mxtest/api/ApiLoadSmokeTest.cpp @@ -12,9 +12,10 @@ namespace mxtest { -// Smoke test: proves each registered file imports (createFromFile -> getData -// yields a part), NOT that the data is correct -- dropped or mistranslated -// elements still pass. Fidelity is the round-trip gate (roundtrip-baseline.txt). +// Smoke test: proves each registered file imports and produces at least one part +// (createFromFile -> getData succeeds with a non-empty ScoreData::parts), NOT that the +// data is correct -- dropped or mistranslated elements still pass. Fidelity is the +// round-trip gate (roundtrip-baseline.txt). class ApiLoadSmokeTest : public mxtest::MxFileTest { public: diff --git a/src/private/mxtest/api/roundtrip-baseline.txt b/src/private/mxtest/api/roundtrip-baseline.txt index 473bae59..79f2ad25 100644 --- a/src/private/mxtest/api/roundtrip-baseline.txt +++ b/src/private/mxtest/api/roundtrip-baseline.txt @@ -60,12 +60,8 @@ lysuite/ly71a_Chordnames.xml lysuite/ly72a_TransposingInstruments.xml lysuite/ly72b_TransposingInstruments_Full.xml -# Dedicated segno/coda api read->write->read fixtures (#204). The audit's -# synthetic/segno.*.xml and synthetic/coda.*.xml probes carry editorial -# part-group/direction children (footnote/level/voice) and no notes, so the -# api -- which omits those and synthesizes -- cannot round-trip -# them through the strict DOM compare for reasons unrelated to segno/coda. -# These two fixtures isolate the segno/coda surface (3.0 base attributes; 3.1 -# adds id + smufl) in a minimal score that round-trips losslessly. +# Dedicated segno/coda api read->write->read fixtures (#204): a minimal score that +# isolates the segno/coda surface (3.0 base attributes; 3.1 adds id + smufl) and +# round-trips losslessly. custom/segno_coda_roundtrip.3.0.xml custom/segno_coda_roundtrip.3.1.xml