fix(group): preserve identity through lifecycle

Group names are mutable and reusable, so they cannot own durable
state. Preserve immutable identities across lifecycle operations and
commit invite use with membership under transaction-time guards.
This commit is contained in:
翅膀 committed 2026-10-23 23:23:27 +08:00
1 parent c853f2910f
commit 81af2053c0
6 files changed
+985 -179

No files matched your search

+7 -2
View File
@@ -105,11 +105,16 @@ export type GroupRole = "owner" | "admin" | "viewer";
export interface GroupMember {
/**
* GitHub login (case-insensitive). Ids are matched when stored, logins
* otherwise; identityMatches handles both.
* GitHub login (case-insensitive). An unbound all-digit entry (legacy
* `adminIds`) is read as a user id; see `memberMatches`.
*/
login: string;
role: GroupRole;
/**
* Immutable GitHub user id of the member, bound by the server (invite
* acceptance, the member's sign-in). Once bound, only that account matches.
*/
userId?: string;
}
export interface Group {