members: by-hand-creation — username + temp password, creating is approving #54

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

Parent

Feature spec: #19 (members).

What to build

Not everyone does links. From Invite (P6-S2 → S1) the operator can create a member by hand — a username and a temporary password — for someone who won't open a QR on a phone, so belonging never depends on phone habits. This path carries no approval step: the operator creating the credentials is the approval (DDR 0073). The new account exists immediately and shows the "hasn't signed in yet" status until the person's first login, at which point they are prompted to set a credential of their own. The account is created through the member orchestrator's idp port (ADR 0077), and the by-hand creation is audit-logged like every other lifecycle action.

Acceptance criteria

  • (story 15) Given I create credentials by hand, when the account exists, then it needs no approval (creating is approving), shows "hasn't signed in yet" until first login, and first login prompts a credential of their own.

Blocked by

  • #42 — the by-hand path returns to the list surface

Task manifest

task: members:by-hand-creation
implements_flow: p6-members
implements_edge: S2→S1 (by-hand path)
wireframe: docs/ux/wireframes/p6-members/p6-s2-invite.html
interface: the `member` orchestrator (ADR 0077) + `idp` port — create-by-hand (username + temp password) landing directly at active with the "hasn't signed in yet" state; no approval step; first-login credential prompt
seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, audit sink; assert no approval transition, \"hasn't signed in yet\" until first login, idempotent creation never duplicates a person"
acceptance:
  - given: I create credentials by hand
    when: the account exists
    then: it needs no approval (creating is approving), shows "hasn't signed in yet" until first login, and first login prompts a credential of their own
depends_on: [member-list-audit]
out_of_scope: [invite-based signup/approval (join-approval's), invite minting (invites'), member detail and reset (member-detail-reset's), outbound notifications]
needs_human_decision: []
## Parent Feature spec: #19 (members). ## What to build Not everyone does links. From Invite (P6-S2 → S1) the operator can create a member by hand — a username and a temporary password — for someone who won't open a QR on a phone, so belonging never depends on phone habits. This path carries no approval step: the operator creating the credentials *is* the approval (DDR 0073). The new account exists immediately and shows the "hasn't signed in yet" status until the person's first login, at which point they are prompted to set a credential of their own. The account is created through the `member` orchestrator's `idp` port (ADR 0077), and the by-hand creation is audit-logged like every other lifecycle action. ## Acceptance criteria - [ ] (story 15) Given I create credentials by hand, when the account exists, then it needs no approval (creating is approving), shows "hasn't signed in yet" until first login, and first login prompts a credential of their own. ## Blocked by - #42 — the by-hand path returns to the list surface ## Task manifest ```yaml task: members:by-hand-creation implements_flow: p6-members implements_edge: S2→S1 (by-hand path) wireframe: docs/ux/wireframes/p6-members/p6-s2-invite.html interface: the `member` orchestrator (ADR 0077) + `idp` port — create-by-hand (username + temp password) landing directly at active with the "hasn't signed in yet" state; no approval step; first-login credential prompt seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, audit sink; assert no approval transition, \"hasn't signed in yet\" until first login, idempotent creation never duplicates a person" acceptance: - given: I create credentials by hand when: the account exists then: it needs no approval (creating is approving), shows "hasn't signed in yet" until first login, and first login prompts a credential of their own depends_on: [member-list-audit] out_of_scope: [invite-based signup/approval (join-approval's), invite minting (invites'), member detail and reset (member-detail-reset's), outbound notifications] needs_human_decision: [] ```
Author
Owner

Done in commit 7b297d9 — the member orchestrator's create-by-hand face (DDR 0073 + ADR 0077, story 15).

What was built (internal/member/):

  • CreateByHand(actor, ByHandSpec) — mints a plain-member account (username + temp password) through the idp port's new runtime CreatePerson verb, landing directly in the "hasn't signed in yet" state (StatusNeverSignedIn) with no approval step — creating is approving. Always a plain member; the operator role is granted later in member detail, never through creation.
  • Idempotent on the username: a double-submit/retry returns the existing record with created=false — never a duplicate person, never a second audit entry.
  • Audit-logged like every other lifecycle action through the standing Audit hook (ActionCreate, operator-attributed; an unattributed create is refused before anything is written).
  • FirstLogin(personID) transitions "hasn't signed in yet" → active on the person's first sign-in and prompts a credential of their own (PromptCredential); only the first login prompts — later logins are quiet no-ops.
  • The idp port + FakeIDP grew CreatePerson (idempotent, temp-credential tracked via Credential()).

Acceptance (story 15) ✓ — the account needs no approval, shows "hasn't signed in yet" until first login, and first login prompts a credential of their own.

Evidence: 6 new seam tests in internal/member/byhand_test.go (no-approval landing, first-login prompt + go-active, unknown-member, idempotent-never-duplicates, audited+attributed, requires-username+temp-password). go/vet/gofmt/golangci-lint clean.

Out of scope (their own slices): invite-based signup/approval, invite minting, member detail/reset, outbound notifications.

Done in commit `7b297d9` — the `member` orchestrator's create-by-hand face (DDR 0073 + ADR 0077, story 15). **What was built** (`internal/member/`): - `CreateByHand(actor, ByHandSpec)` — mints a plain-member account (username + temp password) through the `idp` port's new runtime `CreatePerson` verb, landing **directly** in the "hasn't signed in yet" state (`StatusNeverSignedIn`) with **no approval step** — creating is approving. Always a plain member; the operator role is granted later in member detail, never through creation. - **Idempotent on the username**: a double-submit/retry returns the existing record with `created=false` — never a duplicate person, never a second audit entry. - **Audit-logged** like every other lifecycle action through the standing `Audit` hook (`ActionCreate`, operator-attributed; an unattributed create is refused before anything is written). - `FirstLogin(personID)` transitions "hasn't signed in yet" → active on the person's first sign-in and prompts a credential of their own (`PromptCredential`); only the first login prompts — later logins are quiet no-ops. - The `idp` port + `FakeIDP` grew `CreatePerson` (idempotent, temp-credential tracked via `Credential()`). **Acceptance (story 15)** ✓ — the account needs no approval, shows "hasn't signed in yet" until first login, and first login prompts a credential of their own. **Evidence**: 6 new seam tests in `internal/member/byhand_test.go` (no-approval landing, first-login prompt + go-active, unknown-member, idempotent-never-duplicates, audited+attributed, requires-username+temp-password). `go`/`vet`/`gofmt`/golangci-lint clean. Out of scope (their own slices): invite-based signup/approval, invite minting, member detail/reset, outbound notifications.
ben closed this issue 2026-07-25 07:52:41 +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#54
No description provided.