idip-credentials: T9 — remove a steward: reverse rotation + last-steward refusal #1086

Closed
opened 2026-08-31 18:33:50 +00:00 by ben · 2 comments
Owner

Parent

Spec #1074 (IDIP Members credentials; DDR 0217). Source ticket #1065.

What to build

Removing a steward is the reverse majority rotation: rotate their AID out of the group, re-issue their Membership role: member (revoke the operator one after — never in neither group), operators shrinks. Refused outright when it would leave zero stewards. Uses the same S9i pending/co-sign/cancel machinery and unblocks T6's guard path (rotate out, then remove the member if wanted).

Acceptance criteria

  • Reverse rotation runs the same co-sign machinery (strip, S9i wording reversed, majority of current set)
  • Landing re-issues role: member then revokes the operator ACDC (ordering pinned); operators shrinks; their rescue-pool standing ends
  • Removing the last steward is refused with the honest reason
  • After rotate-out, T6 removal proceeds on the now-plain member

Blocked by

Task manifest

task: idip-credentials-remove-steward
implements_flow: p6-members-idip
implements_edge: "S9i reverse edges"
wireframe: docs/ux/wireframes/p6-members-idip/p6-s9i-pending-rotation.html (reverse wording note)
seam: add-rotate driver seam (reverse) + rotation-state routes
depends_on: [idip-credentials:T8]
out_of_scope: [credential-gated presentation (#1063), custom fields, kanidm-path changes, rescue engine adapters]
needs_human_decision: []
## Parent Spec #1074 (IDIP Members credentials; DDR 0217). Source ticket #1065. ## What to build Removing a steward is the reverse majority rotation: rotate their AID out of the group, re-issue their Membership role: member (revoke the operator one after — never in neither group), operators shrinks. Refused outright when it would leave zero stewards. Uses the same S9i pending/co-sign/cancel machinery and unblocks T6's guard path (rotate out, then remove the member if wanted). ## Acceptance criteria - [ ] Reverse rotation runs the same co-sign machinery (strip, S9i wording reversed, majority of current set) - [ ] Landing re-issues role: member then revokes the operator ACDC (ordering pinned); operators shrinks; their rescue-pool standing ends - [ ] Removing the last steward is refused with the honest reason - [ ] After rotate-out, T6 removal proceeds on the now-plain member ## Blocked by - #1085 (T8) ## Task manifest ```yaml task: idip-credentials-remove-steward implements_flow: p6-members-idip implements_edge: "S9i reverse edges" wireframe: docs/ux/wireframes/p6-members-idip/p6-s9i-pending-rotation.html (reverse wording note) seam: add-rotate driver seam (reverse) + rotation-state routes depends_on: [idip-credentials:T8] out_of_scope: [credential-gated presentation (#1063), custom fields, kanidm-path changes, rescue engine adapters] needs_human_decision: [] ```

swarm-claim host=matou-dev-server-01 run=15303
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=15303 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1086 — status success

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

envelope
{
  "issue": 1086,
  "status": "success",
  "commits": [
    "438fd312f077c22d9a5d413f4f64450c7c772403"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src/lib/keri/client.ts",
    "app/src/lib/stewardRemoveRotate.ts",
    "app/tests/unit/stewardRemoveRotate.test.ts",
    "dashboard/src/components/members/IdipRosterPanel.vue",
    "dashboard/src/components/members/PendingRotationScreen.vue",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/api/stewardRotationClient.ts",
    "dashboard/src/lib/stewardRotation.ts",
    "dashboard/tests/unit/idipRotation.test.ts",
    "dashboard/tests/unit/stewardRotation.test.ts",
    "docs/ux/flows/p6-members-idip.mermaid",
    "internal/controlapi/idip_stewards.go",
    "internal/controlapi/idip_stewards_test.go",
    "internal/keria/adapter.go",
    "internal/keria/registry.go",
    "internal/keria/rotation_adapter_test.go",
    "internal/keria/rotations.go",
    "internal/keria/rotations_test.go",
    "internal/keriawire/wire.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "go test ./...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/keria internal/keriawire internal/controlapi (empty)",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/keria/... ./internal/controlapi/... ./internal/keriawire/...",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./internal/keria/... ./internal/controlapi/... ./internal/keriawire/...",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "cd app && npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "pnpm run lint (eslint .)",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && pnpm run build",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && pnpm vitest run (1317 tests)",
      "exit_code": 0
    },
    {
      "command": "cd app && pnpm vitest run (1215 tests)",
      "exit_code": 0
    },
    {
      "command": "node scripts/check-mermaid.mjs",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Reverse rotation runs the same co-sign machinery (strip, S9i wording reversed, majority of current set)": "internal/keria/rotations.go Rotations.StartRemove delegates to the shared start() (one-at-a-time, MajorityThreshold(currentCount), starter signed first) with DirRemove; the RotationDirection threads to keriawire.StewardRotationView.Direction; dashboard PendingRotationScreen.vue and the IdipRosterPanel S1i strip word themselves in reverse from rotation.direction. Proven by TestRotation_RemoveRunsTheSameCosignMachinery / TestRotation_RemoveOneAtATimeSharesTheStore (Go) and the S9i reverse tests in idipRotation.test.ts (dashboard).",
    "Landing re-issues role: member then revokes the operator ACDC (ordering pinned); operators shrinks; their rescue-pool standing ends": "app/src/lib/stewardRemoveRotate.ts pins issueCredential(role: member) -> removeOperator -> revokeCredential(operatorSaid); internal/keria/adapter.go RotationAdapter.land Demotes on remove (Registry.Demote shrinks Operators()) and retire() ends rescue-pool standing (MintRetired/honest MintPending, never fabricated). Proven by 're-issues role: member THEN revokes …' + order assertion (app) and TestRotationAdapter_RemoveDemotesAndRetireHonest (Go: role becomes member, operators 3->2, retire pending).",
    "Removing the last steward is refused with the honest reason": "internal/keria/rotations.go ErrLastSteward when currentCount <= 1; controlapi words it as 409; app driver rests 'refused' with REMOVE_LAST_STEWARD_REFUSED; dashboard disables the button for the only steward and surfaces the honest server reason. Proven by TestRotation_RemoveLastStewardRefused / TestRotationAdapter_RemoveLastStewardIsAWireConflict / TestStewardRotation_RemoveLastStewardRefused409 (Go), the last-steward refusal test (app), and the disabled-button + honest-refusal tests (dashboard).",
    "After rotate-out, T6 removal proceeds on the now-plain member": "internal/keria/registry.go Registry.Demote flips the role back to credschema.RoleMember, so the removed steward is a plain member (m.role !== 'operator') that T6's removal path operates on. Proven by TestRotationAdapter_RemoveDemotesAndRetireHonest asserting Mere's role is member and the operators group shrank after the remove landed (the enabling condition; T6 is a downstream ticket)."
  },
  "summary": "Remove-a-steward ships as the reverse majority rotation: same co-sign machinery run backwards, honest demote+retire on land, last-steward refused, and the S9i screen/strip/driver worded in reverse.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1086 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1086, "status": "success", "commits": [ "438fd312f077c22d9a5d413f4f64450c7c772403" ], "changed_files": [ "STATUS.md", "app/src/lib/keri/client.ts", "app/src/lib/stewardRemoveRotate.ts", "app/tests/unit/stewardRemoveRotate.test.ts", "dashboard/src/components/members/IdipRosterPanel.vue", "dashboard/src/components/members/PendingRotationScreen.vue", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/api/stewardRotationClient.ts", "dashboard/src/lib/stewardRotation.ts", "dashboard/tests/unit/idipRotation.test.ts", "dashboard/tests/unit/stewardRotation.test.ts", "docs/ux/flows/p6-members-idip.mermaid", "internal/controlapi/idip_stewards.go", "internal/controlapi/idip_stewards_test.go", "internal/keria/adapter.go", "internal/keria/registry.go", "internal/keria/rotation_adapter_test.go", "internal/keria/rotations.go", "internal/keria/rotations_test.go", "internal/keriawire/wire.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "go test ./...", "exit_code": 0 }, { "command": "gofmt -l internal/keria internal/keriawire internal/controlapi (empty)", "exit_code": 0 }, { "command": "go vet ./internal/keria/... ./internal/controlapi/... ./internal/keriawire/...", "exit_code": 0 }, { "command": "golangci-lint run ./internal/keria/... ./internal/controlapi/... ./internal/keriawire/...", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 }, { "command": "cd dashboard && npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "cd app && npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "pnpm run lint (eslint .)", "exit_code": 0 }, { "command": "cd dashboard && pnpm run build", "exit_code": 0 }, { "command": "cd dashboard && pnpm vitest run (1317 tests)", "exit_code": 0 }, { "command": "cd app && pnpm vitest run (1215 tests)", "exit_code": 0 }, { "command": "node scripts/check-mermaid.mjs", "exit_code": 0 } ], "criteria": { "Reverse rotation runs the same co-sign machinery (strip, S9i wording reversed, majority of current set)": "internal/keria/rotations.go Rotations.StartRemove delegates to the shared start() (one-at-a-time, MajorityThreshold(currentCount), starter signed first) with DirRemove; the RotationDirection threads to keriawire.StewardRotationView.Direction; dashboard PendingRotationScreen.vue and the IdipRosterPanel S1i strip word themselves in reverse from rotation.direction. Proven by TestRotation_RemoveRunsTheSameCosignMachinery / TestRotation_RemoveOneAtATimeSharesTheStore (Go) and the S9i reverse tests in idipRotation.test.ts (dashboard).", "Landing re-issues role: member then revokes the operator ACDC (ordering pinned); operators shrinks; their rescue-pool standing ends": "app/src/lib/stewardRemoveRotate.ts pins issueCredential(role: member) -> removeOperator -> revokeCredential(operatorSaid); internal/keria/adapter.go RotationAdapter.land Demotes on remove (Registry.Demote shrinks Operators()) and retire() ends rescue-pool standing (MintRetired/honest MintPending, never fabricated). Proven by 're-issues role: member THEN revokes …' + order assertion (app) and TestRotationAdapter_RemoveDemotesAndRetireHonest (Go: role becomes member, operators 3->2, retire pending).", "Removing the last steward is refused with the honest reason": "internal/keria/rotations.go ErrLastSteward when currentCount <= 1; controlapi words it as 409; app driver rests 'refused' with REMOVE_LAST_STEWARD_REFUSED; dashboard disables the button for the only steward and surfaces the honest server reason. Proven by TestRotation_RemoveLastStewardRefused / TestRotationAdapter_RemoveLastStewardIsAWireConflict / TestStewardRotation_RemoveLastStewardRefused409 (Go), the last-steward refusal test (app), and the disabled-button + honest-refusal tests (dashboard).", "After rotate-out, T6 removal proceeds on the now-plain member": "internal/keria/registry.go Registry.Demote flips the role back to credschema.RoleMember, so the removed steward is a plain member (m.role !== 'operator') that T6's removal path operates on. Proven by TestRotationAdapter_RemoveDemotesAndRetireHonest asserting Mere's role is member and the operators group shrank after the remove landed (the enabling condition; T6 is a downstream ticket)." }, "summary": "Remove-a-steward ships as the reverse majority rotation: same co-sign machinery run backwards, honest demote+retire on land, last-steward refused, and the S9i screen/strip/driver worded in reverse.", "reason": "", "blockers": [], "no_code_change": "" } ``` </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.

Reference
Matou/idss#1086
No description provided.