member suspend can half-converge: DisableCredentials abandons the fan-out on the first failing service, and the retry is a silent no-op #881

Closed
opened 2026-08-26 22:02:41 +00:00 by ben · 2 comments
Owner

The hazard

Orchestrator.endAccess (internal/member/suspend.go:184) runs ADR 0074's three
access-ending moves in order, and move 3 fans out over the catalogue's reconciler ports:

func (c *Catalogue) DisableCredentials(personID string) error {
	for _, p := range c.ports {
		if !c.isDeployed(p.Service()) { continue }   // #875
		if err := p.DisableCredentials(personID); err != nil {
			return err                               // <- first error wins
		}
	}
	return nil
}

One failing service abandons every port after it in registration order. Files may be
converged while chat and code are untouched — or the reverse, depending on which port
happens to sit where in the slice. The member is disabled on some services and live on
others, and which others is an artefact of wiring order, not of anything the operator
did or can see.

What makes it more than a partial write: the retry is a silent no-op

Suspend saves the ledger to StatusSuspended before calling endAccess
(suspend.go:161-165), and audit-logs only after it returns nil. So a mid-fan-out
failure leaves:

state
ledger StatusSuspended — saved
move 1 (IdP disable) done
move 2 (gate deny) done
move 3 (app credentials) partial — converged up to the failing port, untouched after it
audit log no suspend row — o.Audit(...) is never reached
API caller sees an error

The operator retries — the honest reaction to an error — and hits the idempotence guard at
the top of the switch:

case StatusSuspended:
    return nil // idempotent: already paused, no second audit

The retry returns success without re-running a single move. The un-converged services
stay un-converged permanently, and the operator now has a green answer telling them the
member is paused. A suspended member keeps a working git-over-HTTPS token or a live
Mattermost desktop session indefinitely — which is the exact bypass ADR 0074's move 3
exists to close, since the REST and desktop clients never pass the front-door browser gate.

Unsuspend → Suspend is the only path that re-runs the moves, and nothing tells the
operator that is what they need to do.

Removal has already ruled on this — move 3 just doesn't obey it

internal/member/removal.go:14-23 states the doctrine in the codebase's own words:

Partial completion is a first-class, retryable state (ADR 0061 applied to offboarding):
membership is already ended, so a failed fate verb leaves the removal honestly
incomplete — the failed service named, its verb retryable, every other service
unaffected.

Removal's fate verbs behave exactly that way. Removal's access moves do not: it
calls the same endAccess wholesale (removal.go:359), so a removal carries the identical
half-converged tail, and then proceeds to move data on the strength of an access-ending
step that only partly happened — inverting ADR 0075's "access ends before any data moves".

So this is not a new decision. It is applying a rule the repo already made in one half of
offboarding to the other half.

Proposed shape

  1. Fan out fully, collect, then report. DisableCredentials attempts every deployed
    port and returns an aggregate naming each service that failed — never abandoning the
    ports behind a failure. Same for EnableCredentials (the reversal has the identical
    shape and the identical bug).
  2. Make the suspended state carry its own incompleteness, so the idempotence guard can
    tell "paused, converged" from "paused, three services still live" and a retry re-runs
    only what is outstanding rather than returning nil. Removal's per-service fate plan is
    the precedent to copy.
  3. Audit the partial, rather than leaving the ledger saying suspended with no row
    explaining it. An access change that half-happened is precisely the event an audit log
    exists for.
  4. Surface it on the operator's member view in the vocabulary removal already uses —
    the failed service named, its verb retryable.

Point 1 alone removes the wiring-order lottery and is worth landing on its own if 2–4 want
a design pass first.

Why now, and why it is not urgent

Found while closing #875 (the reconciler-port audit behind the phase-2 regression chain).
It is currently unreachable on the rehearsal ladder — #875's deployed-set gate means
an un-deployed service no longer manufactures a port to fail on, and the drives deploy only
files, so the fan-out has exactly one port to walk. That is also why no drive will ever find
it: it needs a community with two or more deployed services where one is genuinely
unhealthy at suspend time, which is a real production shape and not a rehearsal one.

Filing rather than fixing under the chain, per Ben's call.

Acceptance

  • A suspend whose fan-out hits one failing service still attempts every other deployed
    service, and reports which failed.
  • A retry after a partial suspend re-runs the outstanding services instead of returning
    a silent success.
  • The partial is audit-logged and named on the operator's surface.
  • EnableCredentials (unsuspend) carries the same guarantees.
  • Removal's access-ending half inherits all of the above through endAccess.
## The hazard `Orchestrator.endAccess` (`internal/member/suspend.go:184`) runs ADR 0074's three access-ending moves in order, and move 3 fans out over the catalogue's reconciler ports: ```go func (c *Catalogue) DisableCredentials(personID string) error { for _, p := range c.ports { if !c.isDeployed(p.Service()) { continue } // #875 if err := p.DisableCredentials(personID); err != nil { return err // <- first error wins } } return nil } ``` One failing service **abandons every port after it in registration order**. Files may be converged while chat and code are untouched — or the reverse, depending on which port happens to sit where in the slice. The member is disabled on some services and live on others, and *which* others is an artefact of wiring order, not of anything the operator did or can see. ## What makes it more than a partial write: the retry is a silent no-op `Suspend` saves the ledger to `StatusSuspended` **before** calling `endAccess` (`suspend.go:161-165`), and audit-logs only **after** it returns nil. So a mid-fan-out failure leaves: | | state | |---|---| | ledger | `StatusSuspended` — **saved** | | move 1 (IdP disable) | done | | move 2 (gate deny) | done | | move 3 (app credentials) | **partial** — converged up to the failing port, untouched after it | | audit log | **no suspend row** — `o.Audit(...)` is never reached | | API caller | sees an error | The operator retries — the honest reaction to an error — and hits the idempotence guard at the top of the switch: ```go case StatusSuspended: return nil // idempotent: already paused, no second audit ``` **The retry returns success without re-running a single move.** The un-converged services stay un-converged permanently, and the operator now has a green answer telling them the member is paused. A suspended member keeps a working git-over-HTTPS token or a live Mattermost desktop session indefinitely — which is the exact bypass ADR 0074's move 3 exists to close, since the REST and desktop clients never pass the front-door browser gate. `Unsuspend` → `Suspend` is the only path that re-runs the moves, and nothing tells the operator that is what they need to do. ## Removal has already ruled on this — move 3 just doesn't obey it `internal/member/removal.go:14-23` states the doctrine in the codebase's own words: > Partial completion is a first-class, retryable state (ADR 0061 applied to offboarding): > membership is already ended, so a failed fate verb leaves the removal honestly > *incomplete* — the failed service named, its verb retryable, every other service > unaffected. Removal's **fate verbs** behave exactly that way. Removal's **access moves** do not: it calls the same `endAccess` wholesale (`removal.go:359`), so a removal carries the identical half-converged tail, and then proceeds to move data on the strength of an access-ending step that only partly happened — inverting ADR 0075's "access ends before any data moves". So this is not a new decision. It is applying a rule the repo already made in one half of offboarding to the other half. ## Proposed shape 1. **Fan out fully, collect, then report.** `DisableCredentials` attempts *every* deployed port and returns an aggregate naming each service that failed — never abandoning the ports behind a failure. Same for `EnableCredentials` (the reversal has the identical shape and the identical bug). 2. **Make the suspended state carry its own incompleteness**, so the idempotence guard can tell "paused, converged" from "paused, three services still live" and a retry re-runs only what is outstanding rather than returning nil. Removal's per-service fate plan is the precedent to copy. 3. **Audit the partial**, rather than leaving the ledger saying suspended with no row explaining it. An access change that half-happened is precisely the event an audit log exists for. 4. **Surface it on the operator's member view** in the vocabulary removal already uses — the failed service named, its verb retryable. Point 1 alone removes the wiring-order lottery and is worth landing on its own if 2–4 want a design pass first. ## Why now, and why it is not urgent Found while closing #875 (the reconciler-port audit behind the phase-2 regression chain). **It is currently unreachable on the rehearsal ladder** — #875's deployed-set gate means an un-deployed service no longer manufactures a port to fail on, and the drives deploy only files, so the fan-out has exactly one port to walk. That is also why no drive will ever find it: it needs a community with two or more deployed services where one is genuinely unhealthy at suspend time, which is a real production shape and not a rehearsal one. Filing rather than fixing under the chain, per Ben's call. ## Acceptance - A suspend whose fan-out hits one failing service still attempts every other deployed service, and reports which failed. - A retry after a partial suspend re-runs the outstanding services instead of returning a silent success. - The partial is audit-logged and named on the operator's surface. - `EnableCredentials` (unsuspend) carries the same guarantees. - Removal's access-ending half inherits all of the above through `endAccess`.

swarm-claim host=elitebook-distributed-server-03 run=12393
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=12393 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #881 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 881,
  "status": "success",
  "commits": [
    "f611160"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/resting_composition.go",
    "internal/member/detail.go",
    "internal/member/ledger.go",
    "internal/member/removal.go",
    "internal/member/suspend.go",
    "internal/member/suspend_partial_test.go",
    "internal/memberorbit/memberorbit.go",
    "internal/memberorbit/memberorbit_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/member/ ./internal/memberorbit/",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./... && go test ./... (via push gate GATE_GO_CMD)",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./internal/member/... ./internal/memberorbit/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A suspend whose fan-out hits one failing service still attempts every other deployed service, and reports which failed": "memberorbit.Catalogue.DisableCredentials/EnableCredentials now attempt every deployed port (never abandon behind a failure) and return per-service []member.CredentialOutcome — TestReconciler_FanOutFullyDespiteFailingPort (a failing chat port between healthy files+code no longer strands code) and member-side TestSuspend_PartialFanOut_AttemptsAllRecordsAndReports (Suspend returns ErrSuspendIncomplete naming the failing service, other services still disabled)",
    "A retry after a partial suspend re-runs the outstanding services instead of returning a silent success": "Suspend idempotence guard now checks Member.Suspension: a partial re-runs endAccess rather than returning nil — TestSuspend_RetryReRunsOutstanding_NotSilentNoOp (retry while failing still errors/re-runs; healed retry converges and clears the tail; only a converged suspend is a silent no-op)",
    "The partial is audit-logged and named on the operator's surface": "convergeSuspend audits the partial (detail names the still-live services) before returning; Detail.CredentialTail surfaces the outstanding tail with a retry affordance — audit assertion in TestSuspend_PartialFanOut_AttemptsAllRecordsAndReports and TestMemberDetail_SurfacesIncompleteSuspendTail",
    "EnableCredentials (unsuspend) carries the same guarantees": "convergeUnsuspend fans out fully, records Member.Reactivation, returns ErrUnsuspendIncomplete, surfaces the tail, and a retry re-runs outstanding — TestUnsuspend_PartialFanOut_CarriesSameGuarantees",
    "Removal's access-ending half inherits all of the above through endAccess": "endAccess now returns []CredentialOutcome; Remove refuses to move any data on a non-converged access-end (ErrAccessNotEnded, ADR 0075 ordering), naming the failing service and staying retryable — TestRemove_RefusesToMoveDataOnPartialAccessEnd (no data moved, member untouched, no audit; heals and completes)"
  },
  "summary": "member suspend/un-suspend/removal move-3 credential fan-out now attempts every deployed service, carries its own incompleteness, audits and surfaces the partial, and a retry re-runs only the outstanding tail instead of a silent no-op.",
  "blockers": []
}
**close-report** for #881 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 881, "status": "success", "commits": [ "f611160" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/resting_composition.go", "internal/member/detail.go", "internal/member/ledger.go", "internal/member/removal.go", "internal/member/suspend.go", "internal/member/suspend_partial_test.go", "internal/memberorbit/memberorbit.go", "internal/memberorbit/memberorbit_test.go" ], "tests": [ { "command": "go test ./internal/member/ ./internal/memberorbit/", "exit_code": 0 }, { "command": "go build ./... && go vet ./... && go test ./... (via push gate GATE_GO_CMD)", "exit_code": 0 }, { "command": "golangci-lint run ./internal/member/... ./internal/memberorbit/...", "exit_code": 0 } ], "criteria": { "A suspend whose fan-out hits one failing service still attempts every other deployed service, and reports which failed": "memberorbit.Catalogue.DisableCredentials/EnableCredentials now attempt every deployed port (never abandon behind a failure) and return per-service []member.CredentialOutcome — TestReconciler_FanOutFullyDespiteFailingPort (a failing chat port between healthy files+code no longer strands code) and member-side TestSuspend_PartialFanOut_AttemptsAllRecordsAndReports (Suspend returns ErrSuspendIncomplete naming the failing service, other services still disabled)", "A retry after a partial suspend re-runs the outstanding services instead of returning a silent success": "Suspend idempotence guard now checks Member.Suspension: a partial re-runs endAccess rather than returning nil — TestSuspend_RetryReRunsOutstanding_NotSilentNoOp (retry while failing still errors/re-runs; healed retry converges and clears the tail; only a converged suspend is a silent no-op)", "The partial is audit-logged and named on the operator's surface": "convergeSuspend audits the partial (detail names the still-live services) before returning; Detail.CredentialTail surfaces the outstanding tail with a retry affordance — audit assertion in TestSuspend_PartialFanOut_AttemptsAllRecordsAndReports and TestMemberDetail_SurfacesIncompleteSuspendTail", "EnableCredentials (unsuspend) carries the same guarantees": "convergeUnsuspend fans out fully, records Member.Reactivation, returns ErrUnsuspendIncomplete, surfaces the tail, and a retry re-runs outstanding — TestUnsuspend_PartialFanOut_CarriesSameGuarantees", "Removal's access-ending half inherits all of the above through endAccess": "endAccess now returns []CredentialOutcome; Remove refuses to move any data on a non-converged access-end (ErrAccessNotEnded, ADR 0075 ordering), naming the failing service and staying retryable — TestRemove_RefusesToMoveDataOnPartialAccessEnd (no data moved, member untouched, no audit; heals and completes)" }, "summary": "member suspend/un-suspend/removal move-3 credential fan-out now attempts every deployed service, carries its own incompleteness, audits and surfaces the partial, and a retry re-runs only the outstanding tail instead of a silent no-op.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#881
No description provided.