Skip to content

api: round-trip omits fields whose value is 0 (clef-octave-change, transpose diatonic, stem @default-y) #229

Description

@webern

Surfaced by the reworked round-trip classifier (PR #225; part of #212).

What

The api drops elements/attributes whose value is 0, suggesting the writer treats 0 as "unset":

  • <clef-octave-change>0</clef-octave-change> dropped — ksuite/k006a_Clefs_sign_G_ln_2_oct_0_Treble.xml (expected has it; actual does not)
  • transpose <diatonic>0</diatonic> dropped — custom/transposition.musicxml (the 0 entry is missing; distance 1)
  • <stem default-y="0"> loses default-yksuite/k002a_Fermatas.xml (distance 1, sole blocker)

Impact (reorder-free candidate files; 550 total)

  • drop:clef-octave-change 14, attr:stem@default-y 3, drop:diatonic 3
  • The diatonic and stem cases are distance-1 instant wins.

Repro

make dump-api-roundtrip && make classify-api-roundtrip
# build/api/classified.json: signatures drop:clef-octave-change / drop:diatonic / attr:stem@default-y

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiIssues opened by, or through, a coding agent.area/mx::apiarea/mx::implbugsoftware defect

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions