members: removal-fates — honest per-service fate list, end access first, never delete #81
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/idss#81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Parent
Feature spec: #19 (members).
What to build
Removing a member ends their membership but never their data. Choosing remove on member detail opens the removal confirm (P6-S4 → S6) showing each deployed service with its declared fate (ADR 0075): reassign — with a picker offering active members only — where the port supports it, or "archived — kept in place" where it doesn't, plus the "nothing is deleted" note. On confirm (S6 → S1) the suspend move-set runs first so access ends immediately (reusing suspend's three moves, ADRs 0074/0075), then each service's fate verb executes, each audit-logged separately.
Partial completion is a first-class, retryable state. If one service's fate verb fails (S6 → S6x), membership is already ended and the removal shows incomplete with the failed service named and its verb retryable, other services' fates unaffected; when retries succeed (S6x → S1) the removal completes and returns to Members — nothing is ever silently dropped. v1 never deletes member data, so no destructive-confirm (ADR 0060) is needed.
This slice also carries the share-holder warning (ADR 0015) for both suspend and remove: when the member holds a recovery share (kaitiaki or operator), suspending or removing them shows "holds a recovery share — rearrange shared safekeeping in Rescue first" as advice, never a veto — the operator can proceed, and rescue surfaces the degraded coverage. That warning reads rescue's holder state at runtime and renders only when shares exist (a runtime read, not a build edge).
Acceptance criteria
Blocked by
Task manifest
Done — committed as
85e0d57(sandcastle: members:removal-fates #81).What shipped (the
memberorchestrator's remove face,internal/member/removal.go+removal_test.go):RemovalPlanFor(personID)builds the P6-S6 confirm: each deployed service with its declared fate read from the newCatalogueport — reassign (with a picker offering active members only, never self/suspended/awaiting) where the port supports it, "archived — kept in place" where it doesn't — plus the "nothing is deleted" note.Remove(RemovalRequest)runs the suspend move-set first (the threeendAccessmoves refactored out ofsuspend.go: idp disable, gate deny, reconciler credential-disable — access ends immediately), marks the memberremoved, audit-logs the membership-end (ActionRemove), then executes each service's fate verb (Reassign/Archive), each audit-logged separately (ActionFate).RetryRemoval), other services unaffected; when retries succeed the removal completes, the member record is dropped and they return to Members.RemovalStatusreads the standing P6-S6x state.Rescueport (HoldsRecoveryShare, ADR 0015) read at suspend/remove time surfaces the "holds a recovery share — rearrange shared safekeeping in Rescue first" advice on both member detail (suspend surface) and the removal confirm — advice, never a veto (the operator proceeds; suspend/remove both still complete), rendering only when a share is held.Discipline: v1 never deletes (no ADR 0060 destructive-confirm); reassign recipients validated before any access move (never half-removing); attributed (unattributed refused, touching nothing); off-state refusals (
ErrCannotRemove/ErrNotRemoving/ErrNoRecipient/ErrRecipientNotActive/ErrNoSuchMember). NewCatalogue+Rescueports follow the ADR 0062 parts pattern (growing the catalogue never edits members code).Evidence: 14 new seam tests over fake idp/auth-gate/reconciler/catalogue/rescue + in-memory member ledger + audit sink —
go build,go vet,gofmt,golangci-lintall clean. STATUS.md updated in the same commit.Out of scope (left to their slices): rescue's own share re-arrangement ceremony, the catalogue ports' real offboard verbs, komiti/matrix, and archive retention policy.