From 1f118d79e319da4e765502e9ca5b661772de94f1 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 18:38:35 -0400 Subject: refactor: casino table core; fix: stake/migration/validation gaps --- internal/persistence/txn.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/persistence') diff --git a/internal/persistence/txn.go b/internal/persistence/txn.go index 8ba21fa..9939204 100644 --- a/internal/persistence/txn.go +++ b/internal/persistence/txn.go @@ -201,8 +201,10 @@ func (t *Transaction) Move(oldPath, newPath string) error { if dst.Kind != kindMoveTarget && dst.Kind != "" { return fmt.Errorf("conflicting operation on %s", newPath) } - // An existing replace/delete on the destination becomes a move-target - // (the destination's before-image governs rollback). + // The destination must not already carry a replace/delete: callers must + // issue Move before any Replace on the destination. A destination already + // recorded as a move-target (a chained move) keeps its before-image for + // rollback. dst.Kind = kindMoveTarget src.Kind = kindMove src.MoveTo = newPath -- cgit v1.2.3