Skip to content

2.7.0 — three audits' worth of remediation, published

Choose a tag to compare

@alessonqueirozdev-hub alessonqueirozdev-hub released this 26 Aug 16:48
· 229 commits to master since this release
1564845

The first release published to pub.dev since 2.6.0. Three internal milestones were developed between them — as 2.7.0, 2.7.1 and 2.8.0 — and none was ever published, so this release bundles all three. The CHANGELOG folds them into one 2.7.0 entry, newest first, each subsection naming the number it carried during development. Those commits keep annotated milestone/* tags.

Together they close 122 catalogued findings — plus three more found at sign-off — from four adversarial forensic audits, every one of which executed the engine rather than reading it. Documents under doc/ still call the newest milestone 2.8.0 — that is the number it was built under, and rewriting a dated audit to match a later release decision would corrupt the one record here worth trusting.

Every claim below is a before → after measurement.

Blockers closed

  • A mid-measure clef inside a voice was invisible to system restatement. Systems 3–9 restated treble with the bass clef in force; now every system restates the clef actually in effect, on both the grand-staff and single-staff paths.
  • OctaveMark did not displace printed pitch. C6 under 8va / 8vb / 15ma / 15mb / 22da / 22db all sat at staffPos = 8. Now 1 / 15 / −6 / 22 / −13 / 29 — the ink moved +42.5 px, exactly one octave, and MIDI is unchanged.
  • 26 meter/figure combinations produced no beam at all, and 6/2, 9/2, 12/2 and 15/2 produced beams of twelve. A 127-combination sweep now returns zero unbeamed bars and zero groups over 8.
  • Grace notes consumed musical time. A bar measured 1.1875; now 1.0, with onsets back on 0 / 0.25 / 0.5 / 0.75.
  • Chord stems were clamped at 6.0 staff spaces, so they never reached the far notehead. Spans of 7 / 14 / 21 / 28 half-positions now give 7.00 / 10.50 / 14.00 / 17.50 SS.
  • MusicXML tuplets did not survive the round trip (a bar's value went 0.5 → 0.625 with the group dissolved into loose notes), and <time-modification> without <tuplet> was ignored on import (960 ticks where 640 was right).
  • Painting mutated Note.beam, so export depended on whether the score had been displayed — the same score exported 3346 or 3970 characters. This is now ADR-005: layout decisions are values, never model mutations, with an executable guard proven in both directions.

Engraving, interop and export

Dozens more, including a grand-staff PDF that lost 60.2% of the music (now 14 of 14 systems across 3 pages), accidentals colliding inside tuplets (−20.78 px of overlap → +3.00 px of clearance), two beam drawers disagreeing with each other and with Bravura's own engravingDefaults (0.400/0.600 → 0.500/0.250 in both), and MEI silently dropping clef.dis, trans.semi and notes with no @oct.

Gould's rule that a fully beamed tuplet shows only its number (Behind Bars p.201) is now applied to rendered scores — the rule existed and was unit-tested, but had no caller, so every tuplet this package ever drew was bracketed.

Found while closing

  • Each duration now reserves its real notehead advance. Bravura gives noteheadWhole 1.688 staff spaces against noteheadBlack's 1.18; every duration used the latter, so a whole note painted 81 px into a 56.6 px reservation.
  • Painted ink is separated from spacing advance (LayoutEngine.elementPaintedRightExtent). A flag reaches 0.93 staff spaces past the advance on purpose, so a hit box or page width built from the advance clipped it. Spacing is byte-identical — nothing moved.
  • A rest's reservation is centred like its ink. Clicking the left edge of a rest missed on every duration tested, while the right half of its box was empty staff.

API

MusicDuration is the canonical name for the rhythmic duration type. The package exported it only as Duration, which shadows dart:core.Duration for anyone importing the barrel. Both names work; Duration remains a legacy alias and stops being exported in 3.0 (#33).

Not fixed, and said so

Native playback exists only on Android (#1, #15, #20). Layout cannot move to an isolate as written, because TextPainter needs the Flutter engine (#27). No text face ships (#28). Four kinds of malformed MusicXML are still absorbed in silence (#29).

Verification

flutter test → 1015 pass on Ubuntu, Windows and macOS. Pixel goldens → 55 pass. dart analyze and the example app → clean.

The reconciliation of the two independent audits of the same tree — including the 32 of 50 findings only one of them saw, the four published headline numbers that do not reproduce, and one finding retracted as wrong — is in doc/AUDITORIA_RECONCILIADA_2026-08-23.md.