epiphany/crates
Levi Neuwirth 4132a7ac05 Inter-staff review fix: make staff attribution y-aware (stems tore off)
Self-review of the inter-staff solve found a real bug: stroke->staff attribution
reused component_glyph, whose fallback picks the nearest glyph by X ALONE. That
is correct for a SLOT — both staves of a system share their x columns, hence
their spring slots, so the horizontal delta is the same either way — but wrong
for a STAFF: it handed a lower-staff stem to the UPPER staff's notehead. The
stem then kept the wrong vertical shift and tore off its own head (measured
worst stem->notehead distance 5.837 on the two-staff fixture vs 1.150, the stem
x-inset, on the single-staff one), and it polluted the upper staff's content
extent, inflating the computed gap.

Fix: the staff attribution uses a 2-D nearest for that fallback (a ledger still
resolves via owning_glyph's shared Pitch source; a staff line via its Staff
source). component_glyph is unchanged and still serves the horizontal path.

Also corrected: staff-attributed primitives now contribute their y ONLY through
the shifted path (Extent::add_x for x, add_y for the shifted staff extent), so a
lower staff's UNSHIFTED content can no longer inflate a system's max_y. Dead
Extent::add removed.

The corrected attribution yields a smaller, more accurate separation (two-staff
view_box height 36.1 -> 31.1). Regression multi_staff_stems_stay_on_their_own_
staff (verified to fail at 5.837 without the fix). Only the two-staff engrave
golden churned; single-staff goldens byte-stable. 948 tests, clippy 0, docs
-D warnings, conformance 8/8.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 09:42:51 -04:00
..
epiphany-bundle Phase B follow-up: real acceleration-snapshot path + base role bound 2026-07-07 16:54:06 -04:00
epiphany-core Schema major 2 Phase D: the repeat-authoring pair (code tranche) 2026-07-07 20:06:18 -04:00
epiphany-determinism P12-I2: wire the ratified MUSCLOID layout-object id derivation 2026-06-27 12:46:19 -04:00
epiphany-editor-core Schema major 2 Phase E2: slur curves + cubic-bézier primitive 2026-07-08 15:33:00 -04:00
epiphany-editor-gui Schema major 2 Phase E2: slur curves + cubic-bézier primitive 2026-07-08 15:33:00 -04:00
epiphany-engrave Inter-staff review fix: make staff attribution y-aware (stems tore off) 2026-07-09 09:42:51 -04:00
epiphany-layout-ir Push 3 audit follow-up: modify anchor validation, spaced slur_shape, stale docs 2026-07-08 18:54:39 -04:00
epiphany-ops Push 3 audit follow-up: modify anchor validation, spaced slur_shape, stale docs 2026-07-08 18:54:39 -04:00
epiphany-render-svg Inter-staff review fix: make staff attribution y-aware (stems tore off) 2026-07-09 09:42:51 -04:00
epiphany-testkit Inter-staff slice 1/2: a two-staff pressure fixture 2026-07-08 22:48:39 -04:00