members: join-approval — branded signup, waiting, approve/decline over OIDC #64

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

Parent

Feature spec: #19 (members).

What to build

This slice makes the whole two-sided gated door work: a member joining on their own phone, and an operator letting them in. Opening a live invite loads a branded signup screen (P6-S2 → S3) that carries the community's brand, asks the member's name, and offers a passkey — recommended, never required — with a password fallback. Submitting creates the account and lands the member on the branded waiting screen (P6-S3 → S5): account created, waiting for approval, no service open yet, a single-use invite now consumed, and a "check again" affordance that polls their state. The public signup face is a public endpoint of the same control plane, following enroll's public-face discipline (token-authenticated, nothing strong before approval); the branded screens are supplied via the brandkit seam.

On the operator's side, pending people appear in the Members list grouped by the invite that admitted them, each pending row naming its invite (P6-S1). Approving a member (S5 → S1) propagates their one account to every service over OIDC — no per-app accounts — so their next check or sign-in succeeds everywhere their komiti open. Approve-all on an invite's group turns a 40-person hui into one action, with each approval audit-logged individually. Decline is terminal and tidy: the account is removed, the invite stays consumed, any reason the operator optionally records lives only in the audit log, and no member row remains; the member's waiting screen resolves to a branded not-approved state (S5 → S5x) with no reason shown and their credential stops working — a retry needs a fresh invite.

A dead invite is honest but never an accusation: opening one that is expired, revoked, or used up (S2 → S3x) shows a single branded screen that never distinguishes which way it died, with no retry and no sign-in link. Unhappy ends never leak reasons (DDR 0073).

Acceptance criteria

  • (story 7) Given I open a live invite on my phone, when the signup screen loads, then it carries the community's brand, asks my name, and offers a passkey (recommended, never required) with a password fallback.
  • (story 8) Given I submit the signup, when the account is created, then I see the branded waiting screen (account created, waiting for approval), no service opens for me yet, a single-use invite is now consumed, and a "check again" affordance polls my state.
  • (story 9) Given I am awaiting approval, when an operator approves me, then my account propagates to every service over OIDC (no per-app accounts) and my next check/sign-in succeeds everywhere my komiti open.
  • (story 10) Given an invite that is expired, revoked, or used up, when I open it, then I see one branded screen that never distinguishes which way it died, with no retry and no sign-in link.
  • (story 11) Given I am on the waiting screen, when an operator declines me, then it resolves to a branded "you weren't approved this time — talk to the community" state with no reason shown, my credential stops working, and a retry requires a fresh invite.
  • (story 12) Given signups await approval, when I view Members, then each pending row names its invite and rows group by invite.
  • (story 13) Given a multi-use invite admitted several signups, when I tap approve-all on that group, then every listed person becomes active in one action and each approval is audit-logged individually.
  • (story 14) Given a pending signup, when I decline it, then the account is removed, the invite stays consumed, the reason I optionally record lives only in the audit log, and no member row remains.

Blocked by

  • #53 — a live invite is what a signup opens
  • #27 — the signup/waiting screens are branded

Task manifest

task: members:join-approval
implements_flow: p6-members
implements_edge: S2→S3, S3→S5, S5→S1, S5→S5x, S2→S3x
wireframe:
  - docs/ux/wireframes/p6-members/p6-s3-member-joins.html
  - docs/ux/wireframes/p6-members/p6-s5-waiting-approval.html
  - docs/ux/wireframes/p6-members/p6-s3x-dead-invite.html
  - docs/ux/wireframes/p6-members/p6-s5x-not-approved.html
interface: the `member` orchestrator (ADR 0077) public signup endpoint (enroll public-face discipline) + `idp` port (create person, credential); consume-invite, submit-signup → awaiting approval, approve (OIDC propagation), approve-all, decline (terminal, account removed), dead-invite resolution
seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, in-memory invite ledger, audit sink; copy enroll's state-machine + approve/decline + crash-resume families (idempotent re-submit never duplicates, terminal states never move, consumed invite refuses reuse, resume to same awaiting-approval row)"
acceptance:
  - given: I open a live invite on my phone
    when: the signup screen loads
    then: it is branded, asks my name, offers a passkey (recommended, not required) with a password fallback
  - given: I submit the signup
    when: the account is created
    then: I see the branded waiting screen, no service opens yet, a single-use invite is consumed, and "check again" polls my state
  - given: I am awaiting approval
    when: an operator approves me
    then: my account propagates to every service over OIDC and my next sign-in succeeds everywhere my komiti open
  - given: an expired/revoked/used-up invite
    when: I open it
    then: one branded dead-invite screen that never says which way it died, no retry, no sign-in link
  - given: I am on the waiting screen
    when: an operator declines me
    then: a branded not-approved state with no reason, my credential stops working, retry needs a fresh invite
  - given: signups await approval
    when: I view Members
    then: pending rows name their invite and group by invite
  - given: a multi-use invite admitted several signups
    when: I tap approve-all on that group
    then: every listed person becomes active in one action, each approval audit-logged individually
  - given: a pending signup
    when: I decline it
    then: the account is removed, the invite stays consumed, any reason lives only in the audit log, no member row remains
depends_on: [invites, bootstrap:brandkit-seam]
out_of_scope: [invite minting and ledger (invites'), by-hand credential creation (by-hand-creation's), member detail/reset/suspend/removal (later slices), outbound member notifications on approve/decline, self-service reset]
needs_human_decision: []
## Parent Feature spec: #19 (members). ## What to build This slice makes the whole two-sided gated door work: a member joining on their own phone, and an operator letting them in. Opening a live invite loads a branded signup screen (P6-S2 → S3) that carries the community's brand, asks the member's name, and offers a passkey — recommended, never required — with a password fallback. Submitting creates the account and lands the member on the branded waiting screen (P6-S3 → S5): account created, waiting for approval, no service open yet, a single-use invite now consumed, and a "check again" affordance that polls their state. The public signup face is a public endpoint of the same control plane, following enroll's public-face discipline (token-authenticated, nothing strong before approval); the branded screens are supplied via the brandkit seam. On the operator's side, pending people appear in the Members list grouped by the invite that admitted them, each pending row naming its invite (P6-S1). Approving a member (S5 → S1) propagates their one account to every service over OIDC — no per-app accounts — so their next check or sign-in succeeds everywhere their komiti open. Approve-all on an invite's group turns a 40-person hui into one action, with each approval audit-logged individually. Decline is terminal and tidy: the account is removed, the invite stays consumed, any reason the operator optionally records lives only in the audit log, and no member row remains; the member's waiting screen resolves to a branded not-approved state (S5 → S5x) with no reason shown and their credential stops working — a retry needs a fresh invite. A dead invite is honest but never an accusation: opening one that is expired, revoked, or used up (S2 → S3x) shows a single branded screen that never distinguishes which way it died, with no retry and no sign-in link. Unhappy ends never leak reasons (DDR 0073). ## Acceptance criteria - [ ] (story 7) Given I open a live invite on my phone, when the signup screen loads, then it carries the community's brand, asks my name, and offers a passkey (recommended, never required) with a password fallback. - [ ] (story 8) Given I submit the signup, when the account is created, then I see the branded waiting screen (account created, waiting for approval), no service opens for me yet, a single-use invite is now consumed, and a "check again" affordance polls my state. - [ ] (story 9) Given I am awaiting approval, when an operator approves me, then my account propagates to every service over OIDC (no per-app accounts) and my next check/sign-in succeeds everywhere my komiti open. - [ ] (story 10) Given an invite that is expired, revoked, or used up, when I open it, then I see one branded screen that never distinguishes which way it died, with no retry and no sign-in link. - [ ] (story 11) Given I am on the waiting screen, when an operator declines me, then it resolves to a branded "you weren't approved this time — talk to the community" state with no reason shown, my credential stops working, and a retry requires a fresh invite. - [ ] (story 12) Given signups await approval, when I view Members, then each pending row names its invite and rows group by invite. - [ ] (story 13) Given a multi-use invite admitted several signups, when I tap approve-all on that group, then every listed person becomes active in one action and each approval is audit-logged individually. - [ ] (story 14) Given a pending signup, when I decline it, then the account is removed, the invite stays consumed, the reason I optionally record lives only in the audit log, and no member row remains. ## Blocked by - #53 — a live invite is what a signup opens - #27 — the signup/waiting screens are branded ## Task manifest ```yaml task: members:join-approval implements_flow: p6-members implements_edge: S2→S3, S3→S5, S5→S1, S5→S5x, S2→S3x wireframe: - docs/ux/wireframes/p6-members/p6-s3-member-joins.html - docs/ux/wireframes/p6-members/p6-s5-waiting-approval.html - docs/ux/wireframes/p6-members/p6-s3x-dead-invite.html - docs/ux/wireframes/p6-members/p6-s5x-not-approved.html interface: the `member` orchestrator (ADR 0077) public signup endpoint (enroll public-face discipline) + `idp` port (create person, credential); consume-invite, submit-signup → awaiting approval, approve (OIDC propagation), approve-all, decline (terminal, account removed), dead-invite resolution seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, in-memory invite ledger, audit sink; copy enroll's state-machine + approve/decline + crash-resume families (idempotent re-submit never duplicates, terminal states never move, consumed invite refuses reuse, resume to same awaiting-approval row)" acceptance: - given: I open a live invite on my phone when: the signup screen loads then: it is branded, asks my name, offers a passkey (recommended, not required) with a password fallback - given: I submit the signup when: the account is created then: I see the branded waiting screen, no service opens yet, a single-use invite is consumed, and "check again" polls my state - given: I am awaiting approval when: an operator approves me then: my account propagates to every service over OIDC and my next sign-in succeeds everywhere my komiti open - given: an expired/revoked/used-up invite when: I open it then: one branded dead-invite screen that never says which way it died, no retry, no sign-in link - given: I am on the waiting screen when: an operator declines me then: a branded not-approved state with no reason, my credential stops working, retry needs a fresh invite - given: signups await approval when: I view Members then: pending rows name their invite and group by invite - given: a multi-use invite admitted several signups when: I tap approve-all on that group then: every listed person becomes active in one action, each approval audit-logged individually - given: a pending signup when: I decline it then: the account is removed, the invite stays consumed, any reason lives only in the audit log, no member row remains depends_on: [invites, bootstrap:brandkit-seam] out_of_scope: [invite minting and ledger (invites'), by-hand credential creation (by-hand-creation's), member detail/reset/suspend/removal (later slices), outbound member notifications on approve/decline, self-service reset] needs_human_decision: [] ```
Author
Owner

Done — members:join-approval shipped in commit 6371c74 on branch sandcastle/worker/20260725-080448-bd37b7.

The member orchestrator's two-sided join-approval face lands in internal/member/ (control-plane Go seam, ADR 0077 / DDR 0073):

Public signup face (enroll's public-face discipline — invite token authenticates, nothing strong before approval):

  • OpenSignup(token) → branded SignupScreen (P6-S3): community brand via a new Brand port over the brandkit seam, asks the member's name, offers a passkey (recommended, never required) with a password fallback — story 7.
  • SubmitSignup(token, submission) → consumes the invite via the existing Admit, creates the one account through idp.CreatePendingPerson disabled (account created, no service opens yet), landing an awaiting-approval row that names its invite; idempotent on the submission's RequestID (a retry resumes the same row, never a duplicate, never a second invite use) — story 8 + resume/idempotency family.
  • CheckState(personID) → the "check again" poll: awaiting-approval → approved | not-approved — stories 8 & 11.
  • DeadInviteScreen() → one honest branded screen that takes no invite so it structurally cannot say which way it died; expired/revoked/used-up/unknown all refuse uniformly with ErrInviteClosed, no retry, no sign-in link — story 10.

Operator approval gate (attributed + audit-logged, terminal states never move):

  • Approve → OIDC propagation via idp.EnableAccount, next sign-in succeeds everywhere — story 9.
  • ApproveInviteGroup → the hui approve-all: one action, each approval audit-logged individually — story 13.
  • Decline → terminal & tidy: idp.RemoveAccount (credential stops working), invite stays consumed, no member row remains, any reason lives only in the audit log — stories 11 & 14.
  • MembersView grew Pending []PendingGroup — awaiting rows grouped by the invite that admitted them, each naming its invite with approve-all — story 12.

Seam plumbing: idp port + FakeIDP grew CreatePendingPerson / EnableAccount / RemoveAccount with enabled + credential tracking and a CanSignIn hook; new Brand port + FakeBrand; Member grew InviteID + SignupKey, LedgerState grew Seq.

Evidence: 14 new seam tests in internal/member/signup_test.go (one per acceptance clause 7–14 plus the idempotent-re-submit / terminal-states-never-move / consumed-invite-refuses-reuse families). go build / go vet / gofmt / golangci-lint all clean across the module. STATUS.md updated in the same commit.

Out of scope (later slices, untouched): member detail/reset/suspend/remove, outbound member notifications, self-service reset.

Done — `members:join-approval` shipped in commit 6371c74 on branch `sandcastle/worker/20260725-080448-bd37b7`. The `member` orchestrator's two-sided join-approval face lands in `internal/member/` (control-plane Go seam, ADR 0077 / DDR 0073): **Public signup face** (enroll's public-face discipline — invite token authenticates, nothing strong before approval): - `OpenSignup(token)` → branded `SignupScreen` (P6-S3): community brand via a new `Brand` port over the brandkit seam, asks the member's name, offers a passkey (recommended, never required) with a password fallback — **story 7**. - `SubmitSignup(token, submission)` → consumes the invite via the existing `Admit`, creates the one account through `idp.CreatePendingPerson` **disabled** (account created, no service opens yet), landing an awaiting-approval row that names its invite; **idempotent on the submission's `RequestID`** (a retry resumes the same row, never a duplicate, never a second invite use) — **story 8** + resume/idempotency family. - `CheckState(personID)` → the "check again" poll: awaiting-approval → approved | not-approved — **stories 8 & 11**. - `DeadInviteScreen()` → one honest branded screen that takes no invite so it structurally cannot say which way it died; expired/revoked/used-up/unknown all refuse uniformly with `ErrInviteClosed`, no retry, no sign-in link — **story 10**. **Operator approval gate** (attributed + audit-logged, terminal states never move): - `Approve` → OIDC propagation via `idp.EnableAccount`, next sign-in succeeds everywhere — **story 9**. - `ApproveInviteGroup` → the hui approve-all: one action, each approval audit-logged individually — **story 13**. - `Decline` → terminal & tidy: `idp.RemoveAccount` (credential stops working), invite stays consumed, no member row remains, any reason lives only in the audit log — **stories 11 & 14**. - `MembersView` grew `Pending []PendingGroup` — awaiting rows grouped by the invite that admitted them, each naming its invite with approve-all — **story 12**. Seam plumbing: `idp` port + `FakeIDP` grew `CreatePendingPerson` / `EnableAccount` / `RemoveAccount` with enabled + credential tracking and a `CanSignIn` hook; new `Brand` port + `FakeBrand`; `Member` grew `InviteID` + `SignupKey`, `LedgerState` grew `Seq`. Evidence: 14 new seam tests in `internal/member/signup_test.go` (one per acceptance clause 7–14 plus the idempotent-re-submit / terminal-states-never-move / consumed-invite-refuses-reuse families). `go build` / `go vet` / `gofmt` / `golangci-lint` all clean across the module. STATUS.md updated in the same commit. Out of scope (later slices, untouched): member detail/reset/suspend/remove, outbound member notifications, self-service reset.
ben closed this issue 2026-07-25 08:20:52 +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#64
No description provided.