From 378bb8c800a8b06f50d361d299d3e4138bef73a6 Mon Sep 17 00:00:00 2001 From: Kgothatso Ngako Date: Fri, 23 Oct 2026 17:05:03 +0200 Subject: [PATCH] docs: the ceremony-creation plan is built, and the notes it touched say so (Phase 9) shared-key-ceremony.md says where a ceremony starts and how one ends early; subgroups.md points its Phase 10 here; member-chronicle.md says the chronicle is built and carries nothing; the batch-signing, skipped-keys and Material notes mark their document examples as removed; the plan records the ten places the build chose differently. Co-Authored-By: Claude Opus 5.5 --- docs/README.md | 9 +++++---- docs/ceremony-creation.md | 21 ++++++++++++++++++--- docs/frost-batch-signing.md | 5 +++++ docs/material-design-conformance.md | 7 ++++++- docs/member-chronicle.md | 12 +++++++++++- docs/mls-skipped-keys.md | 3 +++ docs/shared-key-ceremony.md | 29 +++++++++++++++++++++++++++++ docs/subgroups.md | 6 ++++++ 8 files changed, 83 insertions(+), 9 deletions(-) diff --git a/docs/README.md b/docs/README.md index f2d6441f..32d9a6bb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -37,9 +37,10 @@ failures a resend repairs and which heal on their own. The sync note stands alone, and the dead-code inventory reads as a follow-up to it. The batch-signing note is a phased plan that has been built: read it after the derivation note, whose one rule is the same one it is built around. The member -chronicle note is a phased plan that has not been built, and reads as the -membership note's unanswered half: what a member who joins late can be given, -and the one thing they cannot. The +chronicle note is a phased plan that has been built and now carries nothing -- +the document kinds it was for are gone -- and reads as the membership note's +unanswered half: what a member who joins late can be given, and the one thing +they cannot. The jvm-target note is unrelated to all of them: it is a build and packaging story. The subgroups note is a phased plan that has been built; it assumes both shared-key notes and reads as the ceremony's second half — what a group does @@ -87,7 +88,7 @@ The group send-an-amount note is a phased plan that has been built, and reads as the third gate of the group chain wallet note's Phase 10: why that gate could not lift as written, and what stands in for it now that it is gone. Read its list of what the gated code got wrong before its phases. -The ceremony-creation note is a phased plan that has not been built. It reads as +The ceremony-creation note is a phased plan that has been built. It reads as the subgroups note's Phase 10 followed through to the screens: read it after that phase, and its table of findings before any phase. Its second half removes the nip30303 documents and leaves the member chronicle built but diff --git a/docs/ceremony-creation.md b/docs/ceremony-creation.md index 1013aef9..141e1631 100644 --- a/docs/ceremony-creation.md +++ b/docs/ceremony-creation.md @@ -12,9 +12,24 @@ bug exists because a subgroup's ceremony moved into the parent's Marmot room, an the screens that start and show ceremonies were written for a room that only ever held its own. -**Not built.** Written against the code as it stood at `e3839da5`. -`CreateSharedKeyScreen` will be the one screen that starts a group's own -ceremony, and `DkgRitualScreen` will only ever show one. +**Built**, one commit per phase on `claude/ceremony-creation` (Phase 7 in two), +against the code as it stood at `e3839da5`. `CreateSharedKeyScreen` is the one +screen that starts a group's own ceremony, and `DkgRitualScreen` only ever shows +one. The phases are kept as written because they are the reasoning; where the +build chose differently it did so these times: + +| what the plan said | what it turned out to be | +|---|---| +| Phase 7 deletes the 103 files, Phase 8 the tables | the line moved. The `Mantra*` entities convert to and from the nip30303 event classes, so the classes, entities and DAOs went in Phase 8 with the tables. Phase 7 removed the screens (part 1) and the inbound handling, `ProposedEvent`'s arms and the chronicle's document parts (part 2) | +| the group details' **Shared key** opens an existing ceremony itself, else the creation screen | it always opens `CreateSharedKeyRoute`, which hands over to an existing ceremony. One place decides, and back from the ceremony still returns to the details | +| only `DkgRitualRoute.dkgSessionId` becomes required | the three approval routes' too, and `DkgRitualUIState.Loaded.session` is non-null. Every approval was already named by the ceremony screen that opened it | +| the subgroup picker's quorum stepper and the shared-key one are one component | two. The picker's asks a different question ("how many admins have to approve a change"), so the shared-key one is `SharedKeyQuorumStepper`, private to the creation screen | +| `requestIfEmpty` keeps its "holds work" check | it had to change: the check read the dialect and artifact tables. A room now holds work if it holds a `GroupSignedEvent` of a chroniclable kind, and with none chroniclable it never asks | +| the chronicle's tests re-fixture | three of four did, with `TEST_KINDS` (a relay list, a profile, a post -- group-signed kinds whose arrival writes no row of its own, so the `GroupSignedEvent` rows are the observable). `ChronicleRoundTripTest` was entirely the rebuild through document rows and is deleted. The positive invite push could not take a test set -- `deliveryWelcome` calls `sendTo` with the app's kinds -- and became the "sends nothing" case | +| `SignedGroupKeyStateTest` and `GroupSignedEventDaoJvmTest` re-fixture in Phase 8 | Phase 7: they failed at runtime the moment document arms stopped writing rows. They sign posts now, and "the row a signed event becomes points back at it" is deleted -- no kept kind writes a row | +| a migration test with tables copied from `26.json` | built from the exported `26.json` at run time and compared with `27.json`, so it cannot drift from what Room expects | +| `CLAUDE.md`'s literal count goes to 20 | 19, after Phase 5 took another | +| 61 strings plus four already unused | 65 in all: the string catalogue test's two chapter strings went once it checked its escapes on `recovered_of_still_unreadable` instead | The headline: **a ceremony is started only from a screen that knows what it is for, and the screen that shows a ceremony can never start one.** Today diff --git a/docs/frost-batch-signing.md b/docs/frost-batch-signing.md index 79fbfc51..c2a0393a 100644 --- a/docs/frost-batch-signing.md +++ b/docs/frost-batch-signing.md @@ -13,6 +13,11 @@ implementation chose differently from the first draft the section says so. chapter is the first caller, and needed a second form of them; see [The first caller](#the-first-caller-a-chapter-and-its-chunks). +*The chapter, the dialect and the artifact screens this note cites have since +been removed, with the rest of the nip30303 documents +([ceremony-creation.md](./ceremony-creation.md)). The batch machinery stays; the +group wallet's spends are its callers now.* + The headline: **there is no such thing as one FROST signature over many messages, and no way to reuse a nonce across them.** What can be batched is the ceremony — the rounds, the group events, and the approval a human is asked for. diff --git a/docs/material-design-conformance.md b/docs/material-design-conformance.md index 2b0f3de5..695bfcf6 100644 --- a/docs/material-design-conformance.md +++ b/docs/material-design-conformance.md @@ -4,6 +4,10 @@ What the M3 foundations actually require, where this app's 43 screens stand against them today, and a phased order of work that makes each phase mechanical by the time it starts. +*Nine of those 43 -- the artifact, chapter, dialect and translation screens -- +have since been removed as unreachable ([ceremony-creation.md](./ceremony-creation.md)), +and one, `CreateSharedKeyScreen`, added. The counts below are as measured.* + The app already builds on Material 3 — `compose-material3:1.10.0-alpha05`, a generated `ColorScheme`, `Scaffold`/`TopAppBar`/`ListItem` throughout. What is missing is not the library. It is that **the design decisions live at the call @@ -882,7 +886,8 @@ navigation component counts drop *below* their floors. **Left for a person, and for a later commit.** Proposals → signing and artifacts → chapters are the two remaining list-detail -families the plan names. Chat was done first and alone, deliberately: it is the +families the plan names (artifacts → chapters has since been removed with the +documents). Chat was done first and alone, deliberately: it is the one the spec is most careful about, and it is the one whose eleven entry points made the shape of the answer clear. The other two are the same shape with different content. diff --git a/docs/member-chronicle.md b/docs/member-chronicle.md index 62c31493..c4484122 100644 --- a/docs/member-chronicle.md +++ b/docs/member-chronicle.md @@ -9,7 +9,17 @@ Read [shared-key-derivation.md](./shared-key-derivation.md) first. The property this whole design rests on -- that a room's id *is* the key it signs with -- is stated there, and everything cheap about what follows is downstream of it. -**Built**, phases 1-9, one commit each, with two exceptions named in Phase 7. The +**Built, and carrying nothing at the moment.** The document kinds it was built +for were removed with their screens ([ceremony-creation.md](./ceremony-creation.md), +Phase 7), and nothing else the group signs is safe or useful to replay. What a +chronicle may carry is now a `ChronicleKinds` value, `ChronicleEvent.KINDS`, and +it is empty: a device asks for no chronicle, sends none, and applies nothing from +a page an older build sends. The machinery below is kept and tested with a kind +set of the tests' own. Adding a kind back means editing `ChronicleEvent.KINDS` on +purpose, with the reason it is safe to replay. The row rebuild and translation +supersession described below went with the documents. + +Built, phases 1-9, one commit each, with two exceptions named in Phase 7. The phases are kept as written because they are the reasoning, and the code reads better against the argument it came from than against a summary of itself. Where the implementation chose differently the section says so, and it did so five diff --git a/docs/mls-skipped-keys.md b/docs/mls-skipped-keys.md index ca7a533f..e59c3741 100644 --- a/docs/mls-skipped-keys.md +++ b/docs/mls-skipped-keys.md @@ -112,6 +112,9 @@ Several flows publish in bursts, and each of them is a reliable trigger: | `MantraDao.addArtifact` | the artifact, then its first version | | `MantraDao.addChapter` | the chapter, then one per paragraph chunk | +*The two `MantraDao` rows are history: the documents were removed +([ceremony-creation.md](./ceremony-creation.md)).* + `addChapter` is the worst of these: a chapter with twenty paragraphs publishes twenty-one events at once, and only the ones that happen to arrive in ascending generation order survive. diff --git a/docs/shared-key-ceremony.md b/docs/shared-key-ceremony.md index bb1b79a2..8b806220 100644 --- a/docs/shared-key-ceremony.md +++ b/docs/shared-key-ceremony.md @@ -135,6 +135,35 @@ and orders each round's messages by their sender's host key to match. Sorting is the only ordering every device can arrive at without being told. Nothing in the protocol checks this, so `ChillDkgRitualOrderingTest` does. +## Where a ceremony starts, and how one ends early + +A ceremony is started in exactly three places, each of which knows what it is +for: group creation (`SelectChatRoomTypeViewModel`) for a new group's own key, +the subgroup picker (`SelectSubgroupAdminsViewModel`) for a subgroup's, and +`CreateSharedKeyScreen` for an existing NIP-17 group that has no key yet. +`CeremonyEntryPointsJvmTest` counts them. `DkgRitualScreen` shows one ceremony, +named by its route, and never starts one: it used to, from the same button slot +its approvals used, and a member coming back from approving a subgroup's +ceremony opened a second, whole-room one in the parent's room. A Marmot room +cannot hold a ceremony of its own at all -- `proposeRitual` refuses and +`acceptProposal` drops one -- since its id is derived from the key it already +has. See [ceremony-creation.md](./ceremony-creation.md). + +A failed ceremony is tried again from the screen that starts its kind: the +creation screen for a group's own, the subgroup picker, filled in from the one +that failed, for a subgroup's. + +Any participant can **abandon** a running ceremony from its screen, which +broadcasts the same 30316 a fault does and ends it for everyone; nobody outside +the ceremony can, and a 30316 from a non-participant is ignored. ChillDKG has no +"no" short of this, and without it a ceremony opened by mistake could only be +left running. + +The kinds above travel in both transports: gift wraps for a group's own +ceremony, Marmot inner events in the parent's room for a subgroup's. In the +second, 30310-30312 once collided with document kinds that shared the numbers, +and `ChatMessage` now recognises a ceremony's kinds before any content kind. + ## After it completes The group has a threshold public key; each device keeps its own share, restorable diff --git a/docs/subgroups.md b/docs/subgroups.md index c8fc3193..f5c079d0 100644 --- a/docs/subgroups.md +++ b/docs/subgroups.md @@ -907,6 +907,12 @@ second is refused rather than silently returning the first's key. ## Phase 10 — the ceremony moves into the parent's room +*Followed up by [ceremony-creation.md](./ceremony-creation.md): with the +ceremony in the parent's room, the shared-key screen's "Start key ceremony" +offered a whole-room ceremony there, and a failed subgroup was retried as one. +A Marmot room now refuses a ceremony of its own, and a failed subgroup is tried +again from this picker, filled in from the ceremony that failed.* + The thing [Phase 4](#why-not-the-parents-marmot-room) deferred, done, because the reason to wait was `docs/mls-skipped-keys.md` and that is being fixed. The child's ChillDKG and its key state now run in the parent's Marmot room on group events;