Spaces epic batch 4: rename — flip, permanent alias, background converge (#771) #776
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat-771"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #771. Implements ADR 0003 slice H — the final batch of the Spaces epic.
Flip.
spaceids.Rename(id, new): one registry write — name flips,backendDirstays, old name appended to permanentaliases(renaming back reclaims it).spacestore.Renamemoves the membership key in the same operation (registry-first, rollback on companion failure). Collision rules mirror Create: live spaces, tombstones in window, other spaces' names AND aliases all refuse; Create now refuses alias-reserved names too.Resolution layer.
scope.Driver.WithSpaceCanon: every/spaces/<seg>resolves name-or-alias → canonical name + backend dir. Membership is judged on the CANONICAL name (a leftover group named like the old name grants nothing); the virtual prefix stays what the user typed, so WebDAV mounts and bookmarks on the former name keep working forever. Sizes fall back to the diverged backend-dir key; the admin inventory skips alias/diverged dirs so no phantom rows appear.Converge.
convergeBackendrenames the storage folder to match (atomic posix; restartable copy-then-delete on S3) then flipsbackendDir;ConvergeSweepretries divergences at every boot. Audited asspace-converge/space-converge-failed; correctness never depends on it.Relink (#715/#129). Directory spaces rename admin-only — that IS Relink, offered on orphan rows in the inventory; the folder keeps identity/image/description/sizes, the old group name becomes an alias.
UI. Calm rename dialog (no danger confirm — the danger was designed out) from the space kebab + inventory rows; aliases listed in inventory details with audited Retire (behind askDanger — it frees the name);
.sphaliasheader hint when entering through a former name. Audit verbs registered ×4. Handbook pagedocs/handbook/spaces-rename.mdships in this release and is indexed.Census bumps: qa693 askDanger 13→14, qa769 kebab-refresh ternary 3→4.
Verification: full local cycle on pushed bytes (RED node+Go → splice → gofmt/vet/build,
go test ./...incl. new flip/alias/reserve/relink/retire/converge/scope-canon tests, 232 node tests) — green first try, repeated by the runner one-shot.