epiphany/crates/epiphany-ops/src
Levi Neuwirth b3403c1d6a ops: ModifyEvent materializes metric placement changes (trim/move)
The make-room enabler: a ModifyEvent that moves a metric event's span
(different Musical position or duration) is now applied to the graph and the
owning voice re-sorted by ascending position (id-tiebroken, the order an
insert maintains), so invariant 3 (VoiceEventsSortedNonOverlap) holds. The
deferral documented in DECISIONS.md is lifted.

modify_event computes one sanction — the move is a valid metric move
(PlacementVerdict::Moved) and the replacement is well-formed — and uses it to
gate both the graph mutation (graph_replace_event) and the voice_occupancy
update, so the canonical index and the graph never diverge. The verdict is
read from voice_occupancy, the graph-independent placement index, so reduce()
and reduce_onto() agree on it; a move with a non-positive span or one that
would overlap a live sibling is refused as a clean NoOp(EventDurationInvalid)
rather than skipped silently. A non-metric move stays deferred, and a
malformed (empty) pitched replacement is neither materialized nor allowed to
move occupancy.

Tests: trim frees the voice slot (a later insert fits); a move onto a sibling
is refused; a trim materializes in the graph (reduce_onto, invariants hold);
a non-metric event is not rewritten onto the musical grid; a malformed move
does not free the slot.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NAtEiJtt9yKVV1zjKYmZhS
2026-06-30 10:43:10 -04:00
..
anomaly.rs Phase 2 (Agent K) M1: value-typed operation payloads + Operation Catalog scaffold 2026-06-24 11:52:02 -04:00
causal.rs Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
conflict.rs Pass 11: consolidated byte-layout appendix + pin ObjectKind/ResolutionAction discriminants 2026-06-22 13:16:20 -04:00
decode.rs Agent K M2d (Group 4): score-settings operations 2026-06-25 19:26:31 -04:00
effect.rs Agent K M2c (Group 3): structural container CRUD operations 2026-06-25 18:10:15 -04:00
encode.rs A B C D F 2026-06-19 12:42:31 -04:00
envelope.rs Phase 2 (Agent K) M1: value-typed operation payloads + Operation Catalog scaffold 2026-06-24 11:52:02 -04:00
fuzz.rs Agent K M2d (Group 4): score-settings operations 2026-06-25 19:26:31 -04:00
lib.rs epiphany-editor-core: a headless editor API + a conformance UI-seam gate 2026-06-27 16:47:34 -04:00
migrate.rs Agent K M2d (Group 4): score-settings operations 2026-06-25 19:26:31 -04:00
opset.rs Phase 2 (Agent K) M1: value-typed operation payloads + Operation Catalog scaffold 2026-06-24 11:52:02 -04:00
payload.rs Agent K M2d review follow-up: harden the Group-4 score-settings ops 2026-06-25 21:45:51 -04:00
reduce.rs ops: ModifyEvent materializes metric placement changes (trim/move) 2026-06-30 10:43:10 -04:00
slot.rs A B C D F 2026-06-19 12:42:31 -04:00
stamp.rs A B C D F 2026-06-19 12:42:31 -04:00
support.rs Pass 11 follow-up: golden-lock the ratified discriminant tables; fix three spec-text inaccuracies 2026-06-22 09:22:55 -04:00
undo.rs A B C D F 2026-06-19 12:42:31 -04:00
v0.rs Agent K M2d (Group 4): score-settings operations 2026-06-25 19:26:31 -04:00
valuegen.rs Agent K M2d review follow-up: harden the Group-4 score-settings ops 2026-06-25 21:45:51 -04:00