members: removal-fates — honest per-service fate list, end access first, never delete #81

Closed
opened 2026-07-25 04:58:49 +00:00 by ben · 1 comment
Owner

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

  • (story 21) Given I choose remove, then I see each deployed service with its declared fate — reassign (picker offering active members only) where the port supports it, "archived — kept in place" where it doesn't — plus the "nothing is deleted" note.
  • (story 22) Given I confirm removal, then the suspend moves run first (access ends immediately), then the fate verbs execute per service, each audit-logged separately.
  • (story 23) Given one service's fate verb fails, then membership is already ended, the removal shows incomplete with the failed service named and its verb retryable, other services' fates unaffected; and when retries succeed, then the removal completes and returns to Members.
  • (story 24) Given the member holds a recovery share (kaitiaki or operator), when I suspend or remove them, then I see "holds a recovery share — rearrange shared safekeeping in Rescue first" as advice, never a veto: I can proceed, and rescue surfaces the degraded coverage.

Blocked by

  • #75 — removal reuses the suspend move-set to end access first

Task manifest

task: members:removal-fates
implements_flow: p6-members
implements_edge: S4→S6, S6→S1, S6→S6x, S6x→S1
wireframe:
  - docs/ux/wireframes/p6-members/p6-s6-remove-member.html
  - docs/ux/wireframes/p6-members/p6-s6x-removal-incomplete.html
interface: the `member` orchestrator (ADR 0077) remove — read per-service declared fates (reassign/archive, ADR 0075), run suspend move-set first then per-service offboard fate verbs; removal-incomplete state (named, retryable); share-holder warning read from rescue's holder state (ADR 0015)
seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, fake catalogue-port offboard fate verbs, audit sink; copy provisioning's per-service partial-failure family (ADR 0061 \u2014 one verb fails \u2192 incomplete, named, retryable, others unaffected); assert access ends before fates run, v1 never deletes"
acceptance:
  - given: I choose remove
    when: the confirm opens
    then: each deployed service shows its declared fate — reassign (active members only) or "archived — kept in place" — plus the "nothing is deleted" note
  - given: I confirm removal
    when: it runs
    then: the suspend moves run first (access ends immediately), then the fate verbs execute per service, each audit-logged separately
  - given: one service's fate verb fails
    when: removal runs
    then: membership is already ended, the removal shows incomplete with the failed service named and retryable, others unaffected; retries that succeed complete it and return to Members
  - given: the member holds a recovery share
    when: I suspend or remove them
    then: "I see the \"holds a recovery share \u2014 rearrange in Rescue first\" advice, never a veto: I can proceed and rescue surfaces the degraded coverage"
depends_on: [suspend]
out_of_scope: [archive deletion / retention policy (v1 never deletes), the suspend switch itself (suspend's), komiti/matrix (komiti-matrix-roles'), rescue's own share re-arrangement ceremony]
needs_human_decision: []
## 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 - [ ] (story 21) Given I choose remove, then I see each deployed service with its declared fate — reassign (picker offering active members only) where the port supports it, "archived — kept in place" where it doesn't — plus the "nothing is deleted" note. - [ ] (story 22) Given I confirm removal, then the suspend moves run first (access ends immediately), then the fate verbs execute per service, each audit-logged separately. - [ ] (story 23) Given one service's fate verb fails, then membership is already ended, the removal shows incomplete with the failed service named and its verb retryable, other services' fates unaffected; and when retries succeed, then the removal completes and returns to Members. - [ ] (story 24) Given the member holds a recovery share (kaitiaki or operator), when I suspend or remove them, then I see "holds a recovery share — rearrange shared safekeeping in Rescue first" as advice, never a veto: I can proceed, and rescue surfaces the degraded coverage. ## Blocked by - #75 — removal reuses the suspend move-set to end access first ## Task manifest ```yaml task: members:removal-fates implements_flow: p6-members implements_edge: S4→S6, S6→S1, S6→S6x, S6x→S1 wireframe: - docs/ux/wireframes/p6-members/p6-s6-remove-member.html - docs/ux/wireframes/p6-members/p6-s6x-removal-incomplete.html interface: the `member` orchestrator (ADR 0077) remove — read per-service declared fates (reassign/archive, ADR 0075), run suspend move-set first then per-service offboard fate verbs; removal-incomplete state (named, retryable); share-holder warning read from rescue's holder state (ADR 0015) seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, fake catalogue-port offboard fate verbs, audit sink; copy provisioning's per-service partial-failure family (ADR 0061 \u2014 one verb fails \u2192 incomplete, named, retryable, others unaffected); assert access ends before fates run, v1 never deletes" acceptance: - given: I choose remove when: the confirm opens then: each deployed service shows its declared fate — reassign (active members only) or "archived — kept in place" — plus the "nothing is deleted" note - given: I confirm removal when: it runs then: the suspend moves run first (access ends immediately), then the fate verbs execute per service, each audit-logged separately - given: one service's fate verb fails when: removal runs then: membership is already ended, the removal shows incomplete with the failed service named and retryable, others unaffected; retries that succeed complete it and return to Members - given: the member holds a recovery share when: I suspend or remove them then: "I see the \"holds a recovery share \u2014 rearrange in Rescue first\" advice, never a veto: I can proceed and rescue surfaces the degraded coverage" depends_on: [suspend] out_of_scope: [archive deletion / retention policy (v1 never deletes), the suspend switch itself (suspend's), komiti/matrix (komiti-matrix-roles'), rescue's own share re-arrangement ceremony] needs_human_decision: [] ```
Author
Owner

Done — committed as 85e0d57 (sandcastle: members:removal-fates #81).

What shipped (the member orchestrator's remove face, internal/member/removal.go + removal_test.go):

  • Story 21 — RemovalPlanFor(personID) builds the P6-S6 confirm: each deployed service with its declared fate read from the new Catalogue port — 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.
  • Story 22 — Remove(RemovalRequest) runs the suspend move-set first (the three endAccess moves refactored out of suspend.go: idp disable, gate deny, reconciler credential-disable — access ends immediately), marks the member removed, audit-logs the membership-end (ActionRemove), then executes each service's fate verb (Reassign/Archive), each audit-logged separately (ActionFate).
  • Story 23 — partial completion is first-class: a failed verb leaves the removal incomplete with the failed service named and its verb retryable (RetryRemoval), other services unaffected; when retries succeed the removal completes, the member record is dropped and they return to Members. RemovalStatus reads the standing P6-S6x state.
  • Story 24 — a new runtime Rescue port (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). New Catalogue+Rescue ports 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-lint all 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.

Done — committed as `85e0d57` (`sandcastle: members:removal-fates #81`). **What shipped** (the `member` orchestrator's remove face, `internal/member/removal.go` + `removal_test.go`): - **Story 21** — `RemovalPlanFor(personID)` builds the P6-S6 confirm: each deployed service with its declared fate read from the new `Catalogue` port — 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. - **Story 22** — `Remove(RemovalRequest)` runs the **suspend move-set first** (the three `endAccess` moves refactored out of `suspend.go`: idp disable, gate deny, reconciler credential-disable — access ends immediately), marks the member `removed`, audit-logs the membership-end (`ActionRemove`), then executes each service's fate verb (`Reassign`/`Archive`), **each audit-logged separately** (`ActionFate`). - **Story 23** — partial completion is first-class: a failed verb leaves the removal **incomplete** with the failed service named and its verb **retryable** (`RetryRemoval`), other services unaffected; when retries succeed the removal completes, the member record is dropped and they return to Members. `RemovalStatus` reads the standing P6-S6x state. - **Story 24** — a new runtime `Rescue` port (`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`). New `Catalogue`+`Rescue` ports 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-lint` all 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.
ben closed this issue 2026-07-25 08:57:40 +00:00
Sign in to join this conversation.
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.

Reference
Matou/idss#81
No description provided.