aboutsummaryrefslogtreecommitdiff
path: root/internal/persistence
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 18:38:35 -0400
committerhistoria <[not public]>2026-09-18 18:38:35 -0400
commit1f118d79e319da4e765502e9ca5b661772de94f1 (patch)
treebca8a3fd1e538f1c302480511e6ba872c92e10b8 /internal/persistence
parent5ad42a51df4dcc5ccc3aa6a6d902085ce2ee4239 (diff)
downloadthehouseoficarus-1f118d79e319da4e765502e9ca5b661772de94f1.tar.gz
refactor: casino table core; fix: stake/migration/validation gaps
Diffstat (limited to 'internal/persistence')
-rw-r--r--internal/persistence/txn.go6
1 files changed, 4 insertions, 2 deletions
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