member: offboard-reconciler — the fate catalogue aggregates over real service ports #213

Closed
opened 2026-07-30 23:20:40 +00:00 by ben · 1 comment
Owner

Parent

Members spec #19 (the member lifecycle's leaving side). Gap audit 2026-07-30 (post #191–#195 sweep). Not on #183's journey — hardening filed alongside the blocker set, confirmed by Ben.

What's true today

  • The member-orbit catalogue is constructed with zero ports and serves as both the fate catalogue and the credential-disable reconciler — offboarding aggregates over nothing. The service-port face has no implementation outside tests.
  • The IdP side (kanidm disable) is real; it's the per-service side — what each provisioned service must do about a leaving member's data and access — that is an empty aggregator.

What to build

Real service-port implementations for the provisioned services that hold member data or credentials (Nextcloud first — it's the fleet's first real service), registered into the catalogue in the whole composition, so a member's suspend/offboard fans out to real per-service answers and the disable reconciler reconciles against truth.

Acceptance criteria

  • Given a provisioned service holding a member's account, When the member is suspended/offboarded, Then the service's real port answers (disable/fate) — not an empty aggregate
  • Given no port registered for a service, Then the catalogue reports the gap honestly — never a silent all-clear
  • Given the reconciler's pass, Then it compares against the services' real state

Task manifest

task: member:offboard-reconciler
implements_seam: "memberorbit's ServicePort (spec #19) — real per-service adapters into the catalogue"
interface: "offboarding fans out to the services that really hold member state"
seam: "an integration test: suspend → real port answers → reconciler agrees with service truth"
acceptance:
  - given: a member with service accounts; when: offboarded; then: every registered real port acts and gaps report honestly
depends_on: []
out_of_scope: [new lifecycle semantics, member-facing UI]
needs_human_decision: []

Blocks

None — #183's journey invites; it doesn't offboard.

## Parent Members spec #19 (the member lifecycle's leaving side). Gap audit 2026-07-30 (post #191–#195 sweep). Not on #183's journey — hardening filed alongside the blocker set, confirmed by Ben. ## What's true today - The member-orbit catalogue is constructed with zero ports and serves as both the fate catalogue and the credential-disable reconciler — offboarding aggregates over nothing. The service-port face has no implementation outside tests. - The IdP side (kanidm disable) is real; it's the per-service side — what each provisioned service must do about a leaving member's data and access — that is an empty aggregator. ## What to build Real service-port implementations for the provisioned services that hold member data or credentials (Nextcloud first — it's the fleet's first real service), registered into the catalogue in the whole composition, so a member's suspend/offboard fans out to real per-service answers and the disable reconciler reconciles against truth. ## Acceptance criteria - [ ] Given a provisioned service holding a member's account, When the member is suspended/offboarded, Then the service's real port answers (disable/fate) — not an empty aggregate - [ ] Given no port registered for a service, Then the catalogue reports the gap honestly — never a silent all-clear - [ ] Given the reconciler's pass, Then it compares against the services' real state ## Task manifest ```yaml task: member:offboard-reconciler implements_seam: "memberorbit's ServicePort (spec #19) — real per-service adapters into the catalogue" interface: "offboarding fans out to the services that really hold member state" seam: "an integration test: suspend → real port answers → reconciler agrees with service truth" acceptance: - given: a member with service accounts; when: offboarded; then: every registered real port acts and gaps report honestly depends_on: [] out_of_scope: [new lifecycle semantics, member-facing UI] needs_human_decision: [] ``` ## Blocks None — #183's journey invites; it doesn't offboard.
Author
Owner

Done in 4a4114e (on origin/main).

The member-orbit catalogue no longer aggregates over nothing:

  • NEW internal/nextcloud — the fleet's first real memberorbit.ServicePort, over Nextcloud's OCS Provisioning API. DisableCredentials/EnableCredentials (suspend move 3, ADR 0074 — disables/enables the account, killing the non-OIDC WebDAV/app-password credentials) and the Archive offboard fate (ADR 0075, disabled-kept-in-place, v1 never deletes), each reconciling against the service's real enabled-state (reads it first, acts only to converge; a pass over a member already at service truth is a truthful no-op, ADR 0100). Data reads account+quota for the removal confirm's fate row. Reassign is honestly refused (ErrReassignUnsupported — file-ownership transfer needs an occ transport the OCS HTTP API can't deliver; deferred as new lifecycle semantics). RoleMapping is front-door-only.
  • memberorbit.Catalogue grew Expect/Gaps — a provisioned member-state service with no registered port is reported as an honest gap, never a silent all-clear.
  • Whole composition wires the Nextcloud port from the gateway's admin connection (OURCLOUD_NEXTCLOUD_URL / _ADMIN_USER / _ADMIN_PASSWORD, clan vars) and declares Nextcloud expected, logging the gap at boot when the connection is absent; the resting composition is unchanged.

Acceptance:

  • AC1 (provisioned service holding a member's account → real port answers, not an empty aggregate): internal/nextcloud/integration_test.go — suspend disables the account at the service; removal runs the archive fate; also the OCS contract tests in nextcloud_test.go.
  • AC2 (no port registered → catalogue reports the gap honestly): TestCatalogue_ReportsUnportedProvisionedGap + memberorbit gap tests + the whole-composition gap test in control-plane/.../offboard_catalogue_test.go.
  • AC3 (reconciler compares against real service state): TestDisableCredentials_ReconcilesAgainstRealState (a second pass over an already-disabled account issues no second OCS write) + the integration seam.

Evidence: internal/nextcloud/{nextcloud,integration}_test.go, internal/memberorbit/memberorbit_test.go, control-plane/cmd/control-plane/offboard_catalogue_test.go.

Note: the sandbox has no Go toolchain (#198), so verification was by careful review; the seam runs go build/vet/test + golangci-lint on push.

Done in `4a4114e` (on `origin/main`). The member-orbit catalogue no longer aggregates over nothing: - **NEW `internal/nextcloud`** — the fleet's first real `memberorbit.ServicePort`, over Nextcloud's OCS Provisioning API. `DisableCredentials`/`EnableCredentials` (suspend move 3, ADR 0074 — disables/enables the account, killing the non-OIDC WebDAV/app-password credentials) and the `Archive` offboard fate (ADR 0075, disabled-kept-in-place, v1 never deletes), each **reconciling against the service's real enabled-state** (reads it first, acts only to converge; a pass over a member already at service truth is a truthful no-op, ADR 0100). `Data` reads account+quota for the removal confirm's fate row. `Reassign` is honestly refused (`ErrReassignUnsupported` — file-ownership transfer needs an occ transport the OCS HTTP API can't deliver; deferred as new lifecycle semantics). `RoleMapping` is front-door-only. - **`memberorbit.Catalogue` grew `Expect`/`Gaps`** — a provisioned member-state service with **no** registered port is reported as an honest gap, never a silent all-clear. - **Whole composition** wires the Nextcloud port from the gateway's admin connection (`OURCLOUD_NEXTCLOUD_URL` / `_ADMIN_USER` / `_ADMIN_PASSWORD`, clan vars) and declares Nextcloud expected, logging the gap at boot when the connection is absent; the resting composition is unchanged. **Acceptance:** - AC1 (provisioned service holding a member's account → real port answers, not an empty aggregate): `internal/nextcloud/integration_test.go` — suspend disables the account at the service; removal runs the archive fate; also the OCS contract tests in `nextcloud_test.go`. - AC2 (no port registered → catalogue reports the gap honestly): `TestCatalogue_ReportsUnportedProvisionedGap` + `memberorbit` gap tests + the whole-composition gap test in `control-plane/.../offboard_catalogue_test.go`. - AC3 (reconciler compares against real service state): `TestDisableCredentials_ReconcilesAgainstRealState` (a second pass over an already-disabled account issues no second OCS write) + the integration seam. Evidence: `internal/nextcloud/{nextcloud,integration}_test.go`, `internal/memberorbit/memberorbit_test.go`, `control-plane/cmd/control-plane/offboard_catalogue_test.go`. Note: the sandbox has no Go toolchain (#198), so verification was by careful review; the seam runs `go build/vet/test` + `golangci-lint` on push.
ben closed this issue 2026-07-31 01:04:57 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#213
No description provided.