You are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
Task
Repair the frozen Partitura source tree in /app/vendor/partitura and produce /app/output.mid by running /app/run_boundary_workflow.py.
The current tree fails at several connected boundaries in its real MusicXML-to-MIDI workflow. Implement the repair in the existing production modules partitura/io/importmusicxml.py and partitura/io/exportmidi.py.
Required behavior
A MusicXML note marked as a chord member normally inherits the preceding note's onset and duration. If such a marker appears before any anchor note in its measure, loading must emit a warning and keep that note as a standalone event instead of raising an assertion or silently dropping it.
Valid chord members must still share the anchor note's onset and duration; the malformed-input fallback must not disable normal chord semantics.
MIDI export must accept Score, Part, PartGroup, ordinary iterables, and one-shot iterators of parts without consuming an iterator during preliminary inspection.
Exporting a score with no parts must raise a clear domain-level ValueError indicating that the score has no parts, before NumPy concatenation or MIDI serialization fails.
Compute PPQ from the score's actual quarter-duration values. Preserve an exact computed PPQ when it is within the Standard MIDI File range; do not substitute a conventional constant.
Standard MIDI File ticks-per-beat is limited to 32767. If the computed PPQ is larger, emit a RuntimeWarning explaining that timing is rounded, cap PPQ at 32767, and still serialize a readable MIDI file with integer event ticks.
Run python3 /app/run_boundary_workflow.py after the repair. The resulting /app/output.mid must be a readable MIDI file generated through the repaired public import/export APIs.
Keep the solution offline and modify the existing implementation rather than replacing the package, altering fixtures, or adding a parallel exporter.