administrator 3/8 — issue and revoke Administrator from the panel (#1948) #1951

Closed
opened 2026-09-28 03:04:55 +00:00 by matou-build-agent · 2 comments

Parent

What to build

A steward can make any member an administrator, and take it back, from the
member's detail.

Issuing (AC-I1). The card names the three grants — the control panel;
admin in the community's services; founding member in the community app —
states plainly that it does not let them sign for the community, carries the
two-speed line once (the panel at their next sign-in, the services when each
next reconciles
), and names what is being signed, the discipline every steward
act keeps. It needs the seat unlocked; a locked seat raises the unlock first
rather than failing the act.

When it doesn't finish (AC-I1x). A receipt that never lands leaves
nothing behind: their Membership is untouched, the row is unchanged, and the
screen says so and offers a retry. No half-granted state anywhere.

Revoking, with a floor (AC-X1). Revoking works normally — except when it is
the only live Administrator in the community, which is refused outright with
the way through named (issue Administrator to another member first). No
override, no "revoke anyway". Revoking never touches their Membership: a
revoked administrator is still a member, with a member's service access.

Acceptance criteria

  • Given an active member and an unlocked seat, when a steward issues Administrator, then AC-I1 shows the three grants, the does-not-sign line, the two-speed line once, and the line naming what is signed.
  • Given that card, when the steward confirms, then the credential is issued from the one community registry and appears on the member's row.
  • Given a locked seat, when a steward attempts to issue, then the unlock is raised first and the issuance proceeds only once unlocked.
  • Given an issuance whose receipt never lands, when it gives up, then AC-I1x renders, the member's Membership and row are unchanged, and a retry is offered.
  • Given exactly one live Administrator in the community, when a steward attempts to revoke it, then AC-X1 refuses, explains the consequence, and offers to issue to someone else first — with no override.
  • Given two or more live ones, when one is revoked, then the revocation proceeds.
  • Given a revoked Administrator, when the member's standing is read, then their Membership is untouched and their member-level service access is unchanged.
  • Proven at the dashboard's injected steward-bundle unit seam, plus internal/keria's registry tests for the last-revoke refusal.

Blocked by

  • 1/8 — the definition must exist to be issued.

Task manifest

task: issue-and-revoke-from-the-panel
implements_flow: administrator-credential
implements_edge: "S4 -> I1 -> A1, I1 -> I1x, S4 -> X1"
wireframe:
  - docs/ux/wireframes/administrator-credential/ac-i1-issue-administrator.html
  - docs/ux/wireframes/administrator-credential/ac-i1x-issue-didnt-finish.html
  - docs/ux/wireframes/administrator-credential/ac-x1-last-administrator.html
interface: |
  member detail gains issue/revoke Administrator (steward acts, signed in-browser)
  revoke refuses when it would leave zero live administrators in the community
seam: dashboard/tests/unit via the injected steward-bundle loader; internal/keria registry tests
acceptance:
  - given: an active member and an unlocked seat
    when: a steward issues Administrator
    then: the card names three grants, the does-not-sign line, two speeds, and what is signed
  - given: an issuance whose receipt never lands
    when: it gives up
    then: nothing is granted and the member's row is unchanged
  - given: the only live Administrator
    when: a revoke is attempted
    then: it is refused with the way through named, and no override exists
depends_on: [administrator-builtin-definition]
out_of_scope: [ending the holder's panel session on revoke (5/8), promotion/demotion (6/8)]
needs_human_decision: []

Ticketed by /to-tickets from spec #1948 (ADR 0286); granularity, the cross-repo edge and the cut-over guard confirmed with Ben 2026-09-28. Slice-map skipped at his call — one feature, no cross-feature coupling left to find.

🤖 Generated with Claude Code

https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY

## Parent - **Spec:** [#1948 — the Administrator credential replaces the operator role](https://git.matou.nz/Matou/idss/issues/1948) (stories 4, 5, 6, 16, 17) - **Design:** ADR 0286 d.1, d.6, d.8 · flow `docs/ux/flows/administrator-credential.mermaid` - **Wayfinder map:** #1293 ## What to build A steward can make any member an administrator, and take it back, from the member's detail. **Issuing (AC-I1).** The card names the **three grants** — the control panel; admin in the community's services; **founding member in the community app** — states plainly that it does **not** let them sign for the community, carries the two-speed line once (*the panel at their next sign-in, the services when each next reconciles*), and names what is being signed, the discipline every steward act keeps. It needs the seat unlocked; a locked seat raises the unlock first rather than failing the act. **When it doesn't finish (AC-I1x).** A receipt that never lands leaves **nothing** behind: their Membership is untouched, the row is unchanged, and the screen says so and offers a retry. No half-granted state anywhere. **Revoking, with a floor (AC-X1).** Revoking works normally — except when it is the **only live Administrator in the community**, which is refused outright with the way through named (*issue Administrator to another member first*). No override, no "revoke anyway". Revoking never touches their Membership: a revoked administrator is still a member, with a member's service access. ## Acceptance criteria - [ ] **Given** an active member and an unlocked seat, **when** a steward issues Administrator, **then** AC-I1 shows the three grants, the does-not-sign line, the two-speed line once, and the line naming what is signed. - [ ] **Given** that card, **when** the steward confirms, **then** the credential is issued from the one community registry and appears on the member's row. - [ ] **Given** a **locked** seat, **when** a steward attempts to issue, **then** the unlock is raised first and the issuance proceeds only once unlocked. - [ ] **Given** an issuance whose receipt never lands, **when** it gives up, **then** AC-I1x renders, the member's Membership and row are unchanged, and a retry is offered. - [ ] **Given** exactly one live Administrator in the community, **when** a steward attempts to revoke it, **then** AC-X1 refuses, explains the consequence, and offers to issue to someone else first — with **no** override. - [ ] **Given** two or more live ones, **when** one is revoked, **then** the revocation proceeds. - [ ] **Given** a revoked Administrator, **when** the member's standing is read, **then** their Membership is untouched and their member-level service access is unchanged. - [ ] Proven at the dashboard's injected steward-bundle unit seam, plus `internal/keria`'s registry tests for the last-revoke refusal. ## Blocked by - 1/8 — the definition must exist to be issued. ## Task manifest ```yaml task: issue-and-revoke-from-the-panel implements_flow: administrator-credential implements_edge: "S4 -> I1 -> A1, I1 -> I1x, S4 -> X1" wireframe: - docs/ux/wireframes/administrator-credential/ac-i1-issue-administrator.html - docs/ux/wireframes/administrator-credential/ac-i1x-issue-didnt-finish.html - docs/ux/wireframes/administrator-credential/ac-x1-last-administrator.html interface: | member detail gains issue/revoke Administrator (steward acts, signed in-browser) revoke refuses when it would leave zero live administrators in the community seam: dashboard/tests/unit via the injected steward-bundle loader; internal/keria registry tests acceptance: - given: an active member and an unlocked seat when: a steward issues Administrator then: the card names three grants, the does-not-sign line, two speeds, and what is signed - given: an issuance whose receipt never lands when: it gives up then: nothing is granted and the member's row is unchanged - given: the only live Administrator when: a revoke is attempted then: it is refused with the way through named, and no override exists depends_on: [administrator-builtin-definition] out_of_scope: [ending the holder's panel session on revoke (5/8), promotion/demotion (6/8)] needs_human_decision: [] ``` --- *Ticketed by `/to-tickets` from spec [#1948](https://git.matou.nz/Matou/idss/issues/1948) (ADR 0286); granularity, the cross-repo edge and the cut-over guard confirmed with Ben 2026-09-28. Slice-map skipped at his call — one feature, no cross-feature coupling left to find.* 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY
Author
Member

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

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

close-report for #1951 — status success

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

envelope
{
  "issue": 1951,
  "status": "success",
  "commits": [
    "ad83f88dd43ac9e048332cff123e2ef48739f820"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/components/members/IdipMemberCredentials.vue",
    "dashboard/src/lib/idipCredentials.ts",
    "dashboard/tests/unit/administratorCredential.test.ts",
    "internal/keria/administrator_registry_test.go",
    "internal/keria/registry.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/keria/",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm exec vitest run tests/unit/administratorCredential.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Given an active member and an unlocked seat, when a steward issues Administrator, then AC-I1 shows the three grants, the does-not-sign line, the two-speed line once, and the line naming what is signed": "IdipMemberCredentials.vue AC-I1 issue-administrator-card (administrator-grants 3 li, not-a-steward-note, single two-speed-note, signs-note); administratorCredential.test.ts 'the card names the three grants, the non-grant, two speeds and what is signed'",
    "Given that card, when the steward confirms, then the credential is issued from the one community registry and appears on the member's row": "confirmIssueAdmin -> bundle.issue({slug: administrator}) -> record().anchorIssuance; test 'confirming issues Administrator from the community registry, and it appears on the member' asserts anchorIssuance:administrator and administrator-held shows",
    "Given a locked seat, when a steward attempts to issue, then the unlock is raised first and the issuance proceeds only once unlocked": "confirmIssueAdmin gates on signing.ensureUnlocked(); test 'a locked seat raises the unlock FIRST' asserts signing.asking true and no anchor until unlock",
    "Given an issuance whose receipt never lands, when it gives up, then AC-I1x renders, the member's Membership and row are unchanged, and a retry is offered": "confirmIssueAdmin catch -> adminFailed banner (administrator-issue-incomplete), no loadHeld/emit; test 'a receipt that never lands leaves nothing granted, and offers a retry' asserts no anchorIssuance, no administrator-held, retry reopens AC-I1",
    "Given exactly one live Administrator in the community, when a steward attempts to revoke it, then AC-X1 refuses, explains the consequence, and offers to issue to someone else first - with no override": "revokeAdmin pre-check client.holders('administrator').length<=1 -> lastAdminRefused (no signing); registry AnchorCredentialRevocation returns ErrLastAdministrator as backstop; tests 'refuses to revoke the only live Administrator' (dashboard) and TestAnchorCredentialRevocation_RefusesLastAdministrator (keria)",
    "Given two or more live ones, when one is revoked, then the revocation proceeds": "revokeAdmin proceeds when holders>1; tests 'revokes normally when another live Administrator remains' (dashboard, anchorRevocation:Eadmin-Ewhetu) and TestAnchorCredentialRevocation_ProceedsWithAnotherAdministrator (keria)",
    "Given a revoked Administrator, when the member's standing is read, then their Membership is untouched and their member-level service access is unchanged": "revokeAdmin never calls suspend/standing; test asserts no suspend call and held-membership data-status active; TestAnchorCredentialRevocation_LeavesMembershipUntouched asserts membership still issued and entry.Credential==CredIssued",
    "Proven at the dashboard's injected steward-bundle unit seam, plus internal/keria's registry tests for the last-revoke refusal": "dashboard/tests/unit/administratorCredential.test.ts (6 tests, injected steward bundle) and internal/keria/administrator_registry_test.go (3 tests)"
  },
  "summary": "Issue and revoke Administrator from the S4i member detail with AC-I1/AC-I1x/AC-X1 screens, backed by a registry last-Administrator floor.",
  "blockers": []
}
**close-report** for #1951 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1951, "status": "success", "commits": [ "ad83f88dd43ac9e048332cff123e2ef48739f820" ], "changed_files": [ "STATUS.md", "dashboard/src/components/members/IdipMemberCredentials.vue", "dashboard/src/lib/idipCredentials.ts", "dashboard/tests/unit/administratorCredential.test.ts", "internal/keria/administrator_registry_test.go", "internal/keria/registry.go" ], "tests": [ { "command": "go test ./internal/keria/", "exit_code": 0 }, { "command": "CI=true pnpm exec vitest run tests/unit/administratorCredential.test.ts", "exit_code": 0 } ], "criteria": { "Given an active member and an unlocked seat, when a steward issues Administrator, then AC-I1 shows the three grants, the does-not-sign line, the two-speed line once, and the line naming what is signed": "IdipMemberCredentials.vue AC-I1 issue-administrator-card (administrator-grants 3 li, not-a-steward-note, single two-speed-note, signs-note); administratorCredential.test.ts 'the card names the three grants, the non-grant, two speeds and what is signed'", "Given that card, when the steward confirms, then the credential is issued from the one community registry and appears on the member's row": "confirmIssueAdmin -> bundle.issue({slug: administrator}) -> record().anchorIssuance; test 'confirming issues Administrator from the community registry, and it appears on the member' asserts anchorIssuance:administrator and administrator-held shows", "Given a locked seat, when a steward attempts to issue, then the unlock is raised first and the issuance proceeds only once unlocked": "confirmIssueAdmin gates on signing.ensureUnlocked(); test 'a locked seat raises the unlock FIRST' asserts signing.asking true and no anchor until unlock", "Given an issuance whose receipt never lands, when it gives up, then AC-I1x renders, the member's Membership and row are unchanged, and a retry is offered": "confirmIssueAdmin catch -> adminFailed banner (administrator-issue-incomplete), no loadHeld/emit; test 'a receipt that never lands leaves nothing granted, and offers a retry' asserts no anchorIssuance, no administrator-held, retry reopens AC-I1", "Given exactly one live Administrator in the community, when a steward attempts to revoke it, then AC-X1 refuses, explains the consequence, and offers to issue to someone else first - with no override": "revokeAdmin pre-check client.holders('administrator').length<=1 -> lastAdminRefused (no signing); registry AnchorCredentialRevocation returns ErrLastAdministrator as backstop; tests 'refuses to revoke the only live Administrator' (dashboard) and TestAnchorCredentialRevocation_RefusesLastAdministrator (keria)", "Given two or more live ones, when one is revoked, then the revocation proceeds": "revokeAdmin proceeds when holders>1; tests 'revokes normally when another live Administrator remains' (dashboard, anchorRevocation:Eadmin-Ewhetu) and TestAnchorCredentialRevocation_ProceedsWithAnotherAdministrator (keria)", "Given a revoked Administrator, when the member's standing is read, then their Membership is untouched and their member-level service access is unchanged": "revokeAdmin never calls suspend/standing; test asserts no suspend call and held-membership data-status active; TestAnchorCredentialRevocation_LeavesMembershipUntouched asserts membership still issued and entry.Credential==CredIssued", "Proven at the dashboard's injected steward-bundle unit seam, plus internal/keria's registry tests for the last-revoke refusal": "dashboard/tests/unit/administratorCredential.test.ts (6 tests, injected steward bundle) and internal/keria/administrator_registry_test.go (3 tests)" }, "summary": "Issue and revoke Administrator from the S4i member detail with AC-I1/AC-I1x/AC-X1 screens, backed by a registry last-Administrator floor.", "blockers": [] } ``` </details>
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#1951
No description provided.