Spaces epic batch 4: rename — flip, permanent alias, background converge (#771) #776

Merged
Cordy merged 5 commits from feat-771 into main 2026-09-26 19:11:52 +00:00
Owner

Closes #771. Implements ADR 0003 slice H — the final batch of the Spaces epic.

Flip. spaceids.Rename(id, new): one registry write — name flips, backendDir stays, old name appended to permanent aliases (renaming back reclaims it). spacestore.Rename moves 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. convergeBackend renames the storage folder to match (atomic posix; restartable copy-then-delete on S3) then flips backendDir; ConvergeSweep retries divergences at every boot. Audited as space-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); .sphalias header hint when entering through a former name. Audit verbs registered ×4. Handbook page docs/handbook/spaces-rename.md ships 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.

Closes #771. Implements ADR 0003 slice H — the final batch of the Spaces epic. **Flip.** `spaceids.Rename(id, new)`: one registry write — name flips, `backendDir` stays, old name appended to permanent `aliases` (renaming back reclaims it). `spacestore.Rename` moves 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.** `convergeBackend` renames the storage folder to match (atomic posix; restartable copy-then-delete on S3) then flips `backendDir`; `ConvergeSweep` retries divergences at every boot. Audited as `space-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); `.sphalias` header hint when entering through a former name. Audit verbs registered ×4. Handbook page `docs/handbook/spaces-rename.md` ships 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.
Scaffold: fix-771-splice.py (verify-then-apply)
ci: #771 one-shot (red gates, splice, green gates, self-remove)
All checks were successful
fix-771 / fix (push) Successful in 1m7s
355cc7d592
Closes #771
ci: #771 changelog one-shot
All checks were successful
chg-771 / chg (push) Successful in 7s
913c0f5b06
docs: changelog for v0.6.289 (#771)
All checks were successful
ci / test-and-build (pull_request) Successful in 1m32s
0a7a90a14d
Cordy merged commit 8bc1ec4cfd into main 2026-09-26 19:11:52 +00:00
Cordy deleted branch feat-771 2026-09-26 19:11:54 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#776
No description provided.