members: invites — mint single/multi-use invites + open-invites ledger #53
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/idss#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Feature spec: #19 (members).
What to build
From the Members list the operator opens Invite (P6-S1 → S2) to mint an invite — the shareable link/QR that admits one person as a member. Minting with defaults produces a single-use invite that expires in 14 days, carries a join-as komiti preset, and renders as both a link and a QR with a copy affordance. Multi-use is a deliberate choice, never a default: the USES control sits at single-use, and switching it to multi-use is an explicit act (DDR 0073) that lets one printed QR admit a roomful at a hui — every signup still landing in the approval queue until expiry or revocation.
Invites are their own object with their own ledger (open → used-up | expired | revoked), never a phantom member row. The open-invites ledger shows each invite's label, komiti preset, single- or multi-use, uses so far, and expiry; revoking one immediately stops it admitting signups and marks it revoked in the ledger only. Every invite always admits a plain member — the operator role is never grantable through an invite; it is granted later in member detail. All of this runs through the
memberorchestrator (ADR 0077) with the invite ledger in the control-plane runtime store.Acceptance criteria
Blocked by
Task manifest
Done in commit
e1fcde6(sandcastle: members:invites #53).Built the
memberorchestrator's invite face ininternal/member/invite.go— an invite is its own object with its ownInviteLedger(a members-owned record separate from the memberLedger), never a phantom member row (DDR 0073).Acceptance clauses — all covered by seam tests (
internal/member/invite_test.go):TestMintInvite_DefaultsAreSingleUse14DayKomitiLinkAndQR—MintInvitewith defaults ⇒ single-use,InviteTTL14-day expiry, join-as komiti preset,Link+QR(same payload behind a crypto/rand token) with the wireframe's copy affordance.TestMintInvite_MultiUseIsExplicitAndAdmitsMany—InviteSpec.MultiUseis an explicit field (never a default); a multi-use invite admits any number of signups (eachStatusAwaitingApproval) and stays open, while a single-use one becomes used-up after one.TestOpenInvites_LedgerColumnsAndRevoke— the ledger row carries label · preset · single/multi-use · uses so far · expiry · derived status;RevokeInviteimmediately stops admission (nextAdmit⇒ErrInviteClosed) and showsrevokedin the ledger only.TestAdmit_AlwaysPlainMemberAwaitingApproval— for single- and multi-use,AdmitreturnsRoleMember+StatusAwaitingApproval; an invite never grants operator (granted later in member detail).Plus: expired-stops-admitting (time-derived), unknown-token, mint/revoke audited + operator-attributed (
ActionInvite/ newActionInviteRevoke, unattributed refused), revoke idempotent.Admitis the invite's admission verb join-approval's signup builds on — it records the use but creates no member row.go test(19 in-package tests) /go vet/gofmt/golangci-lintall clean. STATUS.md updated (header + milestone log) in the same commit.Out of scope (untouched): the member-facing signup/waiting/approval screens + dead-invite screen (join-approval's slice), by-hand creation (#54), bulk/CSV invites, open no-invite signup.