Skip to content

api reorders identification/encoding children on round-trip #220

Description

@webern

Surfaced by the round-trip failure classifier (#211, PR #217).

What

51 files are classified "reorder-only" (category C): the output contains exactly the same elements as the input (the tag multiset is identical, nothing dropped or added) but in a different order. Every one of them diverges at the same place:

/score-partwise/identification/encoding/software

So the api is writing the children of <encoding> (software, encoding-date, supports, ...) in a different order than the source file. The music is fully intact; the file just isn't a byte-faithful copy.

Fix options

  1. Make the api writer emit <encoding> children in MusicXML schema order, or
  2. Treat encoding-child order as a non-difference in comparison normalization (this overlaps with the divergence policy in api: define divergence policy and guardrails for round-trip corpus coverage #214).

Option 1 is the more faithful fix; option 2 is the cheaper one if encoding order is deemed insignificant.

Severity

Low — content is preserved, only ordering differs. But it currently blocks 51 files from the strict pass-list.

Repro

make dump-api-roundtrip && make classify-api-roundtrip
# build/api/classified.json: primary_category "C", first_divergence_path on encoding

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