Findings No. 109
Verovio prints a measure's `number`, never its `text`
Barmark's MusicXML export writes two bar number fields, but Verovio 6.4.1 reads only number, never text, so scores drifted from grids after repeats
MusicXML gives a measure two fields for its number: number, which a reader is free to use however it likes, and text, which is what the format says should be displayed. Verovio 6.4.1 reads number into the rendered measure and ignores text entirely, so any export that trusts the format's stated intent shows the wrong bar count the moment the two fields diverge.
Barmark's MusicXML export writes number as a running count of every measure actually written out, repeats and replays included, while text carries barmark's own written bar number. In a test chart, after a replayed section the grid's bar 27 showed up as the score's measure 39. The same mismatch appeared with a repeat inside a repeated section (## A x2 holding |: C | F :|), with no replay anywhere in the chart.
The fix lives in forVerovio (packages/score/src/engrave.ts): it hands Verovio each measure's text as its number, while leaving the underlying MusicXML export unchanged, so a program that actually reads text still gets correct, unique numbers.
The general rule: when a format defines two fields for the same idea, check which one the renderer you are actually targeting reads. Don't assume it follows the format's stated intent.
Receipt: Barmark, packages/score/src/engrave.ts and packages/score/tests/for-verovio.test.ts.