From 9d2a13b856dc3a521e4409a7f330f0f45e316e95 Mon Sep 17 00:00:00 2001 From: Kgothatso Ngako Date: Fri, 20 Nov 2026 02:18:19 +0200 Subject: [PATCH] docs: admin promotion is built but for its share work, and where the build chose differently Co-Authored-By: Claude Opus 5.5 --- docs/README.md | 6 +++--- docs/member-admin-promotion.md | 36 ++++++++++++++++++++++++---------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/docs/README.md b/docs/README.md index a8c363a3..02b9cf96 100644 --- a/docs/README.md +++ b/docs/README.md @@ -35,7 +35,7 @@ the [retired](./retired/) notes now. | [marmot-v2.md](./marmot-v2.md) | bringing the group layer onto the Marmot current profile after the quartz 1.15.2 bump — the nine rules that reach this app, why the room's id and the routing id have to become two values, nine phases from reading both profiles to publishing before applying, and the one fork the library cannot yet settle | | [marmot-kmp.md](./marmot-kmp.md) | moving the group layer off quartz's engine and onto marmot-kmp, mls-kmp and crypto-kmp — why staying on quartz 1.15.2 is staying on an engine that left, the 228 import lines and the one rule that places all but two of them, the group state on a device that must still open afterwards, nine phases that put the swap in one commit and the evidence around it, how often this app persists a group once a sent message no longer rewrites it, and the schema change that followed, opened from the version the app ships | | [giza-wallet-removal.md](./giza-wallet-removal.md) | taking every wallet out of Giza, phased and built but for moving off the wallet library (7b). Covers why a Giza member declines a Bennu peer's wallet proposal instead of ignoring or signing it, why the wallet's kinds are retired rather than freed, why a recovery phrase stays as a key backup that has to derive the same npub and id byte for byte, and why the threshold crypto keeps the build tied to the wallet library until the last phase | -| [member-admin-promotion.md](./member-admin-promotion.md) | making a member an admin and back, phased and built for convenient rooms, under three rules: every admin holds a share, every commit in a keyed room is a proposal until the group's threshold signature is on it, and a robust group keeps at least three admins. Covers why the commit rides inside the group's signature and the rule inside the group's state, which lets every device refuse an unsigned commit with the libraries as they are, why a member's own leave stays exempt, and why a removed admin comes back as an admin when re-invited today | +| [member-admin-promotion.md](./member-admin-promotion.md) | making a member an admin and back, phased and built but for promotion with a share and demotion with a refresh, under three rules: every admin holds a share, every commit in a keyed room is a proposal until the group's threshold signature is on it, and a robust group keeps at least three admins. Covers why the commit rides inside the group's signature and the rule inside the group's state, which lets every device refuse an unsigned commit with the libraries as they are, why a member's own leave stays exempt, and why a removed admin comes back as an admin when re-invited today | | [giza-rebrand.md](./giza-rebrand.md) | forking Bennu as Giza under `mobi.giza` — what carries the name, what must not be renamed and why, why the desktop data directory changes first, and how the fork keeps merging from Bennu | Start with the ceremony if you are new to this area; the Marmot notes all assume it. @@ -104,8 +104,8 @@ that phase, and its table of findings before any phase. Its second half removes the nip30303 documents and leaves the member chronicle built but carrying no kinds, so read it before building on the chronicle note. -The member-admin-promotion note is a phased plan built for convenient rooms and not yet -for keyed ones, which wait on its Phase 0. It reads as +The member-admin-promotion note is a phased plan built but for its share work (Phases 8 +and 9), which waits on enrollment leaving experimental. It reads as the Marmot v2 note's Phase 7 finished, and as the share-refresh note put to work: a promotion is an enrollment and a demotion is a refresh. Read its three rules and its headline before any phase. Its headline is the one idea the keyed-room half stands diff --git a/docs/member-admin-promotion.md b/docs/member-admin-promotion.md index b11b902a..991d3aee 100644 --- a/docs/member-admin-promotion.md +++ b/docs/member-admin-promotion.md @@ -4,28 +4,44 @@ A plan for promoting a member of a group to admin and demoting an admin back to member. It also covers the jobs that need the same machinery: removing an admin, an admin stepping down, and an admin leaving. -**A phased plan, partly built.** Written against the code as it stood at `fc437d05`, with +**A phased plan, built but for its share work.** Written against the code as it stood at `fc437d05`, with marmot-kmp 2.2.1 and mls-kmp 1.3.0 as the catalogue pins them. The second draft adds three rules the first draft lacked; they are stated in the next section, and most of the plan follows from them. **Built**, one commit per phase on `claude/member-admin-promotion-plan-d9d716`: the -first release's phases (10a, 1, 2, 6, and 10 and 11 for convenient rooms), Phase 7's -app side, and Phase 3. The plan was then revised: the first draft's Phase 0, upstream -work in mls-kmp and marmot-kmp, is gone, because the commit now travels inside the -group's signature (the headline). **Not built yet:** Phases 4, 5, 8, 9 and 12, and 7's -gate half. Where the build chose differently: +first release's phases (10a, 1, 2, 6, and 10 and 11 for convenient rooms), Phases 3, 4a, +4b, 5 and 5b, and Phase 7 on both sides (the app's refusals, and the floor every device +holds a commit to at the door). The first draft's Phase 0 -- upstream work in mls-kmp and +marmot-kmp -- was dropped when the commit moved inside the signature (the headline). +**Not built:** Phases 8 and 9 (promotion with a share, demotion with a refresh, both +behind enrollment and refresh leaving experimental), Phase 10's keyed-room rows, and +Phase 12. **Not run:** nothing here has been on a device, and no test runs a real FROST +ceremony through `GovernanceManager.propose` -- the tests stand a key pair in for the +room's aggregated key, which is all a FROST signature is once made, and drive the steps +either side of the session. + +Where the build chose differently: | what the plan said | what it turned out to be | |---|---| | Phase 2's lines in the library's order: departures, arrivals, demotions, promotions | after the membership lines, which keep the order they had (arrivals, then departures); then demotions, then promotions | | Phase 3's statement has a `disband` line | a `component` line per GroupContext component the commit changes, by id and the hash of its new value. Disband, enabling disband and a rename are all that one rule, and a statement cannot sign off one component while the commit changes another | -| Phase 3's kind "in the 303xx range" | 30370, past the last retired wallet kind (30366) | -| Phase 6's removal of an admin is "chained in memory" | through `MarmotEngine.afterConfirmed`, registered *before* the commit it waits on so a relay's OK cannot overtake it, and taken back if publishing throws. Leaving as an admin uses the same hook. It applies in keyed rooms too, where every member is an admin, so a removal there is also two commits | -| Phase 7's floor is checked on demotion, removal and leaving | on removal only, so far: a keyed room offers no demotion and no leave for an admin until Phase 5, and the floor is enforced where those arrive | +| Phase 3's kind "in the 303xx range" | 30370, past the last retired wallet kind. 30371 is the own-commit envelope, 30372 the support announcement, 30373 the carrier | +| Phase 4a: the signed statement is published as an application message | inside a **carrier** (30373) sent by a member. The inbound path holds every application message to its sender's own key (MIP-03), and a statement is the room's, so it cannot travel as one -- which is also why `FrostSigningManager.complete` never publishes a group-signed event. The carrier vouches for nothing; the statement inside is checked on its own signature | +| Phase 4a: an own commit (30371) is "signed by the committer's account key" | sent by it: the inner event is an unsigned rumor whose author MLS has already authenticated as its sender, so the check is that the sender is the committer | +| D4: the marker is `giza-governance: threshold/v1` | `Changes need the group's signature; at least N admins.` -- it carries the **floor** too. A floor each device worked out from the ceremony it holds would differ between a founder and a member welcomed later, and the two would disagree about a commit | +| Phase 4a's copy-check reads a commit's proposals off the copy | the proposals off the copy, and who a Remove names off the live group as it stood before the commit: the copy's view can already have the removed leaf blank. Found by the inbound removal test; without it every signed removal was refused at the door | +| Phase 4b: an invite into a governed room is refused for an account that has not announced | not built. A joiner announces as soon as it hears another member say it, which every device does once per room; a joiner on a build that cannot follow is the open problem D4 names | +| Phase 5: any other admin publishes a signed change after a short wait | only the proposer publishes. A proposer who goes quiet after the signature leaves the change waiting until it comes back | +| Phase 5: a stale statement is proposed again automatically | it is marked stale and the room says so; proposing again is the person's | +| Phase 5b: a removal of an admin is two signed commits | one: the proposer builds it on its own copy of the group, which can stage a Remove and the admin-list update together where the library's manager cannot | +| Phase 5b: disband proposes each of its commits | in a room that has not agreed it can be disbanded, the first press proposes that agreement and says to disband again once it is signed | +| D7: founding commits authorised by the key state | dropped: the rule is switched on after founding (Phase 4b), so founding needs nothing | +| Phase 6's removal of an admin is "chained in memory" | through `MarmotEngine.afterConfirmed`, registered *before* the commit it waits on so a relay's OK cannot overtake it, and taken back if publishing throws. Leaving as an admin uses the same hook. In a governed room a removal is one signed commit instead | +| Phase 7's floor is checked on demotion, removal and leaving | on removal and on every governed commit at the door; a keyed room offers no demotion and no leave for an admin until Phases 8 to 10 | | Phase 10's keyed-room rows: "above the floor" and "at the floor" | one row for now. A keyed room's admin who presses **Leave group** is told, as before, that an admin cannot leave; `AdminLeave.CANNOT` | | Phase 11's dialogs for every action | removal keeps the immediate action it had; promotion, demotion and stepping down ask first | -| Phase 1 calls `reconcileAdmins` from `initiateChatRoomDetail` | and from `MarmotGroupCreation` in place of `stampAdmins`, and from the direct-message and convenient-room creation sites, as planned; the repository's `reconcileAdmins(chatRoomId)` is what the view models call | Read [marmot-v2.md](./marmot-v2.md) Phase 7 first. Removing a member, disbanding and the derived membership captions all come from there. Read