feat: round-trip direction voice and pin the synthetic segno/coda fixtures#238
Merged
Conversation
gen-quality
|
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.9% | 28539 / 36624 |
| Functions | 74.4% | 6360 / 8550 |
| Branches | 50.7% | 22672 / 44725 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 78.3% | 5955 / 7604 |
| Functions | 62.4% | 1979 / 3173 |
| Branches | 47.7% | 5032 / 10549 |
Core HTML report | API HTML report
Commit ce847bd484327bd77cb46a9e98e9e0d34fd800ab.
webern
commented
Jun 22, 2026
384f715 to
c14698f
Compare
10dcbbb to
180ee48
Compare
gen-quality
|
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.9% | 28539 / 36624 |
| Functions | 74.4% | 6360 / 8550 |
| Branches | 50.7% | 22672 / 44725 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 78.3% | 5955 / 7604 |
| Functions | 62.4% | 1979 / 3173 |
| Branches | 47.7% | 5032 / 10549 |
Core HTML report | API HTML report
Commit 1bab5daee1ceb62a9b4dd881af5d32f39262460b.
180ee48 to
86e5978
Compare
This was referenced Jun 22, 2026
Read and write the editorial-voice <voice> on a <direction> so a direction's voice assignment survives the api round-trip. It is emitted only when the direction also writes direction-type content, so a voice carried in from a figured-bass or harmony element never produces an empty <direction>. Strip the footnote/level editorial boilerplate from the synthetic segno/coda fixtures -- no file in the wild corpus uses editorial, so the api does not model it -- and give each measure a divisions plus a note so it round-trips. Pin the four fixtures in the api read->write->read gate.
86e5978 to
1366899
Compare
gen-quality
|
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.9% | 28539 / 36624 |
| Functions | 74.4% | 6360 / 8550 |
| Branches | 50.7% | 22672 / 44725 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 78.1% | 5874 / 7518 |
| Functions | 62.1% | 1962 / 3159 |
| Branches | 47.5% | 4956 / 10431 |
Core HTML report | API HTML report
Commit d98cb724abe447eb943d9d6405e40d09c84cda2c.
webern
added a commit
that referenced
this pull request
Jun 23, 2026
) ## Summary The audit generator stamps `<footnote>`/`<level>` editorial onto nearly every synthetic single-feature fixture, but editorial appears in zero real-world corpus files — all 382 editorial-bearing files were under `data/synthetic/`. That boilerplate implied mx::api needed editorial support it does not actually need for the wild corpus, which is why #236 was closed without merging. This removes the `<footnote>x</footnote>`/`<level>x</level>` boilerplate from every synthetic fixture except the dedicated footnote/level probes, which keep only their own target element. One uniform rule does this safely: the boilerplate is always the plain `>x<` form, while each probe's target is always attributed (`<footnote default-x=...>`, `<level reference=...>`), so deleting the plain form strips the noise everywhere and preserves every probe's intent. - 382 fixtures changed (379 stripped fully; the footnote/level probes keep their attributed target) - `*.features.xml` sidecars and `corpus.xml` regenerated ## Testing - [x] corert: 832 test cases pass, pinned corpus count unchanged (the now-empty part-groups round-trip) - [x] api round-trip regression gate: 38/38 - [x] Full mxtest: 4268 assertions in 307 test cases (ApiLoadSmokeTest walks every stripped file) - [x] No code changes; `clang-format` not applicable ## Notes While regenerating sidecars, `audit files --force` also corrected a stale `<audited-version>` (3.0 → 3.1) in `data/custom/segno_coda_roundtrip.3.1.features.xml`. That file belongs to #235, so the correction was reverted out of this PR to keep it focused — worth fixing on the #235 branch. ## References - Stacked on #238 (base branch `claude/issue-237-roundtrip-vsvcas`) - Follows from #236 (editorial dropped from mx::api; closed) - Progresses #221 — footnote/level are no longer dropped across ~373 classifier files now that the synthetic boilerplate is gone - Part of #208 (api round-trip corpus coverage)
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.
Brings the audit's synthetic
segno/codafixtures onto the strict api read -> write -> read gate.What
Round-trip the editorial-voice
<voice>on a<direction>(read fromeditorialVoiceDirection().voice(), written back). Today a direction's own<voice>is dropped. The write is emitted only when the direction has direction-type content, so a voice carried in from a figured-bass/harmony element never produces an empty<direction>.<voice>is common in the wild corpus, so this is real fidelity, not synthetic-only.Pin
synthetic/{segno,coda}.{3.0,3.1}.xmlinroundtrip-baseline.txt. To make them round-trip losslessly the fixtures are tidied:<footnote>/<level>editorial boilerplate the audit generator stamps onto every probe (editorial appears in zero real-world files, so the api does not model it — see feat: model editorial (footnote/level) in mx::api #236, closed)<divisions>+ a<note>so the writer's first-measure<divisions>is legitimate instead of a spurious injection into a note-less measureThey still isolate the segno/coda surface (3.0 base attributes; 3.1 adds id + smufl) and now also exercise a part-group and direction
<voice>/<staff>through the publicDocumentManagerpath.Why a real note instead of an impl fix for
<divisions>A note-less measure that the writer fills with a synthesized
<divisions>is the #228 writer-policy issue. A naive "suppress divisions when the part has no notes" guard regressesksuite/k016a_Miscellaneous_Fields.xml, which legitimately carries<divisions>in a note-less measure — distinguishing "source had it" from "api invented it" needs divisions-presence tracking in the public api, out of scope here. So the fixtures carry a real note; the writer-policy gap stays open under #228.Follow-up
A separate PR on top of this one strips the editorial boilerplate from every other synthetic file that isn't the dedicated
footnote/levelprobe, so the synthetic corpus stops implying api features the wild corpus never uses.Testing
mxtest: 4268 assertions in 307 test cases, all passclang-formatclean; audit*.features.xmlsidecars +corpus.xmlregeneratedReferences
<divisions>and dropped direction<voice>#237, with the<divisions>writer-policy part staying with api: round-trip injects implied default elements:<type><line><voice><staff>#228