epiphany/crates
Levi Neuwirth bdab6dee1f testkit: an editing-loop vertical slice across the ops/layout/render seams
One iteration of an interactive edit, wired end to end so a missing connection
between the crates surfaces here, not in a GUI: render a score to its RenderIR,
resolve a click on a notehead to its graph pitch through the hit-test map, apply a
real operation (sharpen -- a +1-chromatic Transpose) by reducing it onto the score
graph, re-render, and confirm the selection survives the relayout.

  - run_edit_loop_with<S: ConstraintSolver>(base, solver) returns an EditLoopReport
    (selected_pitch, selection, graph_changed, selection_preserved, render_changed);
    run_edit_loop is the stub wrapper. render_with returns None for a
    diagnostic-only (non-renderable) solver report, so the loop never hit-tests or
    edits a layout the caller must not render.
  - The click resolves like a GUI's: aim at each real notehead's centre (a notehead
    glyph, not synthesized, pitch-backed) and select whatever the topmost hit there
    is, taking the first aim whose topmost hit is a pitch-backed glyph -- faithful
    to a click and robust to an occluding unison/chord notehead.
  - Selection survival rests on the MUSCLOID layout id, a function of the pitch's
    identity (PitchId), not its content: the sharpen changes the pitch's value but
    not its id, so its layout object keeps the same stable id and the cursor does
    not jump off the edited note. The prepass re-runs inside to_logical, so the
    edited pitch is re-spelled and its accidental reflects the new value (why the
    re-render reliably differs).

Tests drive the loop on valid_score_rich (one fixture and across 48 seeds, every
seed required), refuse a diagnostic-only solver layout, and -- in epiphany-engrave,
via its existing testkit dev-dep -- run it through the real Engraver across 16
seeds, proving the selection survives even as the Engraver re-spaces every glyph.
Full gate green: build, fmt, clippy, conformance scale 1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 16:25:17 -04:00
..
epiphany-bundle Pass 11 audit follow-up: honest LayoutObjectId status + doc/test gaps 2026-06-22 10:02:05 -04:00
epiphany-core Agent I-0: real clef + key-signature data in the core graph 2026-06-26 10:31:16 -04:00
epiphany-determinism P12-I2: wire the ratified MUSCLOID layout-object id derivation 2026-06-27 12:46:19 -04:00
epiphany-engrave testkit: an editing-loop vertical slice across the ops/layout/render seams 2026-06-27 16:25:17 -04:00
epiphany-layout-ir layout-ir: a render-to-hit-test contract at the RenderIR boundary 2026-06-27 14:25:53 -04:00
epiphany-ops Agent K M2e review follow-up: tighten catalog accuracy + container creates 2026-06-26 09:52:13 -04:00
epiphany-render-svg Pass-12 batch: mark the resolved I-series rows done 2026-06-27 12:53:36 -04:00
epiphany-testkit testkit: an editing-loop vertical slice across the ops/layout/render seams 2026-06-27 16:25:17 -04:00