docs: the record of more than one group from the same people (nip17-multiple-ceremonies, Phase 7)

Built except for the device run. The plan keeps its phases as written,
with a table of where the build differs. A ceremony from before names were
carried is matched under its room's name, now pinned in a test; the check
on a real upgraded device has not been done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-11-22 22:59:13 +02:00
1 parent 729efdaca6
commit 03e2d10def
3 files changed
+40 -2

No files matched your search

@@ -330,6 +330,22 @@ class RobustRoomKeyCeremonyTest {
assertTrue(started.content.startsWith("started a shared key ceremony."), started.content)
}
/**
* A ceremony from a build before ceremonies carried names has none on its row. It
* was named by its room when it opened, so that is the name a repeated ask is
* matched against, and a device upgraded mid-ceremony folds into it rather than
* opening a second. docs/nip17-multiple-ceremonies.md, Phase 7.
*/
@Test
fun `a ceremony from before names were carried is named by its room`() = runBlocking {
val room = robustRoom()
val old = openCeremony(room).let { it.copy(subject = null).also { row -> db.dkgSessionDao().upsert(row) } }
assertEquals(old.id, openCeremony(room).id, "the same ask, under the room's name")
assertEquals(old.id, openCeremony(room, subject = "robust group").id)
assertNotEquals(old.id, openCeremony(room, subject = "Agora").id, "another name is another group")
}
/**
* A collapsed ceremony leaves the group with no key and a room they can still
* talk in, which is exactly the group that should be able to try again. Failed