What I observed
remove --children can fail while rolling back a nested custom-storage layout, leaving registered workspaces at missing paths and data stranded under .trash.
Reproduction
cargo build --locked
probe=$(mktemp -d /tmp/rift-remove-children.XXXXXX)
mkdir -p "$probe/source"
printf 'keep me\n' > "$probe/source/valuable-data"
rift_bin="$PWD/target/debug/rift"
db="$probe/registry.sqlite"
"$rift_bin" --database "$db" init --here "$probe/source"
container=$("$rift_bin" --database "$db" create "$probe/source" --name container)
nested=$("$rift_bin" --database "$db" create "$probe/source" --name nested --into "$container/holding")
"$rift_bin" --database "$db" remove "$probe/source" --children
printf 'container=%s nested=%s\n' "$container" "$nested"
find "$probe" -name .rift -o -name valuable-data -print
sqlite3 "$db" 'select path from rift order by path; select count(*) from trash;'
The remove command exits 1 with:
No such file or directory (os error 2)
The source marker remains. The original container path is recreated as an empty directory tree without its marker, and the original nested path is missing. Both workspaces, their markers, and valuable-data are under .trash/<id>-container. SQLite still has all three active rows at their original paths and no trash rows.
Expected
If remove --children fails, rollback restores every child at its registered path with its marker and data.
Actual
Rollback leaves active registry rows pointing to missing or incomplete paths and strands the workspace data under trash storage.
Environment
- Rift commit
757a22cb247f
- macOS 26.6.2, arm64, APFS
What I observed
remove --childrencan fail while rolling back a nested custom-storage layout, leaving registered workspaces at missing paths and data stranded under.trash.Reproduction
The remove command exits 1 with:
The source marker remains. The original container path is recreated as an empty directory tree without its marker, and the original nested path is missing. Both workspaces, their markers, and
valuable-dataare under.trash/<id>-container. SQLite still has all three active rows at their original paths and no trash rows.Expected
If
remove --childrenfails, rollback restores every child at its registered path with its marker and data.Actual
Rollback leaves active registry rows pointing to missing or incomplete paths and strands the workspace data under trash storage.
Environment
757a22cb247f