Back to Plate

Slate V2 Operations Family Deleted-Test Closure

docs/plans/2026-04-09-slate-v2-operations-family-deleted-test-closure.md

53.0.64.8 KB
Original Source

Slate V2 Operations Family Deleted-Test Closure

Scope

Close the deleted packages/slate/test/operations/** family with explicit cluster accounting instead of leaving it as a vague shadow behind snapshot-contract.ts.

Family Closure Matrix

Cluster idDeleted countStatusCurrent proof ownerResolution
operations.move_node2recovered nowoperations-contract.tsdirect proof covers no-op, later-slot destination rebasing, and current selection rebasing on the raw move_node seam
operations.split_node4recovered nowoperations-contract.tsdirect proof covers text/element behavior plus the *-empty-properties rows
operations.remove_node11recovered nowoperations-contract.tsrestored as direct family proof and fixed at the core operation seam; snapshot overlap stays incidental, not the owner
operations.remove_text9recovered nowoperations-contract.tsrestored as direct expanded-selection proof on the raw remove_text seam instead of only surviving inside snapshot
operations.set_node/remove-omit1recovered nowoperations-contract.tsdirect proof covers omit-to-remove semantics on the current raw set_node seam
operations.set_node/null-undefined2explicit skipnonenull/undefined removal sentinels are backwards-compat legacy and not part of the current public claim
operations.set_selection2explicit skipnonecustom selection props are outside the current Range contract and are not part of the live public claim

Totals:

  • mirrored now: 0
  • recovered now: 27
  • explicit skip: 4
  • reconciled total: 31

Why The Restores Were Real

  • remove_node was not just a deleted-fixture nostalgia row. The engine in core.ts was not rebasing transaction.selection at all for remove_node.
  • the restored direct proof covers:
    • rebasing to next text when deleting the selected leading empty text
    • rebasing to previous text end when deleting the selected trailing empty text
    • rebasing into an adjacent inline when deleting the selected trailing spacer text
  • remove_text now has direct expanded-selection proof instead of only a collapsed cursor case buried in the snapshot suite
  • set_node omitted-property removal and split_node empty-properties behavior are now direct raw-operation rows instead of indirect behavior

Explicit Skip Rationale

operations.set_selection

  • custom-props.tsx
  • remove.tsx

Skip reason:

  • the current selection contract is a plain Range with anchor and focus
  • the live public surface does not claim legacy ad-hoc custom selection props
  • restoring these would widen the current contract instead of closing a proved gap

operations.set_node

  • remove-null.tsx
  • remove-undefined.tsx

Skip reason:

  • those rows exist for backwards-compat removal sentinels
  • the current contract is the simpler omit-to-remove behavior proved by remove-omit.tsx
  • widening back to null/undefined deletion semantics is not justified by the current public claim

Code Change

  • core.ts now rebases selection for remove_node by finding the nearest surviving point in the draft tree before removal, then transforming that fallback through the operation

Proof Owner