Skip to content

docs: confirm isTieStart+isTieStop already model the continuation tie#328

Open
webern wants to merge 1 commit into
mainfrom
support-continuation-tie
Open

docs: confirm isTieStart+isTieStop already model the continuation tie#328
webern wants to merge 1 commit into
mainfrom
support-continuation-tie

Conversation

@webern

@webern webern commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Human Summary

Interesting. Instead of implementing a continuation tie for #291, the agent confirmed that it is not technically needed and wrote documentation to that effect.

Summary

#291 asked whether mx::api needs a dedicated ContinuationTie class (by analogy with
TieLetRing, #286) to model "ties at the start of 2nd endings and the like."

Per the MusicXML spec (core::TiedType's doc comment): "For other ties that are visually attached
to a single note, such as a tie leading into or out of a repeated section or coda, use two tied
elements on the same note, one start and one stop." NoteData::isTieStart/isTieStop are already
independent bools (unlike TieLetRing's lone, unpaired mark, this is an ordinary tie on each side),
and NoteWriter already emits both <tie> and <tied> pairs when both are set
(NoteWriter::addTie, called for stop then start). So the exact scenario rpatters1 described
already round-trips with the existing model -- a new class would just be a second, redundant way to
say the same thing, which is what #249's "one fact, one field" principle is explicitly meant to
prevent.

Added a regression test proving it (a note with isTieStop and isTieStart both true survives
write -> read intact) and expanded the field's doc comment to state this directly, since the shape
isn't obvious from the field declarations alone -- closing the loop on the design question with a
concrete, working answer instead of new API surface.

Testing

  • New tieStopAndStartOnSameNote test (NoteDataTest.cpp)
  • make test: all pass (4734 assertions in 379 test cases, plus the three examples)
  • make test-api-roundtrip: 158 passed, 0 failed (of 158 pinned; no regressions -- no api
    behavior changed)
  • make fmt / make check: clean

References

@webern webern added feature new feature request non-breaking fixes or implementation that do not require breaking changes api Affects the mx::api layer ai Issues opened by, or through, a coding agent. labels Jul 7, 2026 — with Claude
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Coverage report

Core-dev coverage src/private/mx/core/

Metric Coverage Covered / Total
Lines 77.8% 28513 / 36640
Functions 74.3% 6352 / 8551
Branches 50.7% 22678 / 44751

API coverage src/private/mx/{api,impl,utility}/

Metric Coverage Covered / Total
Lines 80.8% 6391 / 7913
Functions 67.7% 2217 / 3275
Branches 49.5% 5476 / 11052

Core HTML report | API HTML report

Commit 374a7599d101ee30eefafd5c8dfff56f4c54fdfa.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

gen-quality gen/

gen-quality: 84.5 / 100   (floor 84.5, +0.0)

  structure     86.5  x0.50   [fn 90.5 / file 82.6]
  cyclomatic    88.4  x0.25
  cognitive     76.6  x0.25

  409 functions across 31 files, 7702 lines (largest file 1044)
  max cc 56  max cognitive 44  max fn loc 152

Worst offenders (top 5 per axis; full lists in score.json):
  cyclomatic gen/xsd/analyze.py:311     report                             56
  cyclomatic gen/plates/build.py:956    _validate_config_against_ir        35
  cyclomatic gen/press/context.py:145   plate_context                      34
  cyclomatic gen/__main__.py:46         _ir                                23
  cyclomatic gen/tests/test_ir.py:102   _check_references                  20
  cognitive  gen/xsd/analyze.py:311     report                             44
  cognitive  gen/ir/resolve.py:119      flat_elements                      40
  cognitive  gen/tests/test_ir.py:102   _check_references                  38
  cognitive  gen/press/context.py:145   plate_context                      37
  cognitive  gen/xsd/analyze.py:207     _sccs                              37
  size       gen/xsd/analyze.py:311     report                             152
  size       gen/press/context.py:145   plate_context                      96
  size       gen/plates/build.py:533    _value_plate                       89
  size       gen/plates/build.py:956    _validate_config_against_ir        89
  size       gen/ir/resolve.py:119      flat_elements                      78

Commit 374a7599d101ee30eefafd5c8dfff56f4c54fdfa.

#291 asked whether mx::api needs a dedicated ContinuationTie class (by
analogy with TieLetRing, #286) to model "ties at the start of 2nd endings
and the like."

Per the MusicXML spec (core::TiedType's doc comment): "For other ties that
are visually attached to a single note, such as a tie leading into or out
of a repeated section or coda, use two tied elements on the same note, one
start and one stop." NoteData::isTieStart/isTieStop are already independent
bools (unlike TieLetRing's lone, unpaired mark, this is an ordinary tie on
each side), and NoteWriter already emits both <tie> and <tied> pairs when
both are set (NoteWriter::addTie, called for stop then start). So the exact
scenario rpatters1 described already round-trips with the existing model --
a new class would just be a second, redundant way to say the same thing,
which is what #249's "one fact, one field" is explicitly meant to prevent.

Added a regression test proving it (a note with isTieStop and isTieStart
both true survives write -> read intact) and expanded the field's doc
comment to state this directly, since the shape isn't obvious from the
field declarations alone -- closing the loop on the design question with a
concrete, working answer instead of new API surface.

## Testing

- [x] New `tieStopAndStartOnSameNote` test (NoteDataTest.cpp)
- [x] make test: all pass (4734 assertions in 379 test cases, plus examples)
- [x] make test-api-roundtrip: 158 passed, 0 failed (of 158 pinned; no
  regressions -- no api behavior changed)
- [x] make fmt / make check: clean

Closes #291
@webern webern force-pushed the support-continuation-tie branch from c20593c to f4e6166 Compare July 7, 2026 09:22
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Coverage report

Core-dev coverage src/private/mx/core/

Metric Coverage Covered / Total
Lines 77.8% 28513 / 36640
Functions 74.3% 6352 / 8551
Branches 50.7% 22678 / 44751

API coverage src/private/mx/{api,impl,utility}/

Metric Coverage Covered / Total
Lines 80.9% 6424 / 7943
Functions 67.8% 2221 / 3276
Branches 49.6% 5504 / 11100

Core HTML report | API HTML report

Commit 9a83f0e2b7d027307ba571581c93251d4a57a8b8.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

gen-quality gen/

gen-quality: 84.5 / 100   (floor 84.5, +0.0)

  structure     86.5  x0.50   [fn 90.5 / file 82.6]
  cyclomatic    88.4  x0.25
  cognitive     76.6  x0.25

  409 functions across 31 files, 7702 lines (largest file 1044)
  max cc 56  max cognitive 44  max fn loc 152

Worst offenders (top 5 per axis; full lists in score.json):
  cyclomatic gen/xsd/analyze.py:311     report                             56
  cyclomatic gen/plates/build.py:956    _validate_config_against_ir        35
  cyclomatic gen/press/context.py:145   plate_context                      34
  cyclomatic gen/__main__.py:46         _ir                                23
  cyclomatic gen/tests/test_ir.py:102   _check_references                  20
  cognitive  gen/xsd/analyze.py:311     report                             44
  cognitive  gen/ir/resolve.py:119      flat_elements                      40
  cognitive  gen/tests/test_ir.py:102   _check_references                  38
  cognitive  gen/press/context.py:145   plate_context                      37
  cognitive  gen/xsd/analyze.py:207     _sccs                              37
  size       gen/xsd/analyze.py:311     report                             152
  size       gen/press/context.py:145   plate_context                      96
  size       gen/plates/build.py:533    _value_plate                       89
  size       gen/plates/build.py:956    _validate_config_against_ir        89
  size       gen/ir/resolve.py:119      flat_elements                      78

Commit 9a83f0e2b7d027307ba571581c93251d4a57a8b8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Issues opened by, or through, a coding agent. api Affects the mx::api layer feature new feature request non-breaking fixes or implementation that do not require breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support continuation tie in api

1 participant