diff --git a/composeApp/src/commonMain/composeResources/values/strings.xml b/composeApp/src/commonMain/composeResources/values/strings.xml
index d9218f1c..5fa3e3bd 100644
--- a/composeApp/src/commonMain/composeResources/values/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values/strings.xml
@@ -721,4 +721,6 @@
Accepting discloses this group's admins and threshold to the coordinator, sealed so that only they can read them.
This device does not hold that proposal
Couldn't ask the group to answer
+ Every group accepted. %1$d admins across %2$d groups would hold the confederation's key.
+ The confederation's key ceremony is not available in this version yet
diff --git a/composeApp/src/commonMain/kotlin/mobi/giza/compose/database/repository/DatabaseConfederationRepository.kt b/composeApp/src/commonMain/kotlin/mobi/giza/compose/database/repository/DatabaseConfederationRepository.kt
index 89594c1a..b6f1c646 100644
--- a/composeApp/src/commonMain/kotlin/mobi/giza/compose/database/repository/DatabaseConfederationRepository.kt
+++ b/composeApp/src/commonMain/kotlin/mobi/giza/compose/database/repository/DatabaseConfederationRepository.kt
@@ -6,6 +6,9 @@ import kotlin.time.Clock
import kotlin.time.Instant
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.StateFlow
+import mobi.giza.compose.identity.Identity
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
import mobi.giza.compose.database.GizaDatabase
@@ -23,7 +26,14 @@ import mobi.giza.compose.repository.ConfederationRepository
class DatabaseConfederationRepository(
private val database: GizaDatabase,
private val scope: CoroutineScope,
+ /** The identity the app runs as: its key opens the acceptances when it coordinates. */
+ private val activeIdentity: StateFlow = MutableStateFlow(null),
) : ConfederationRepository {
+ override suspend fun outcome(proposalId: HexKey): ConfederationManager.Outcome? {
+ val secret = activeIdentity.value?.nostrPrivateKey ?: return null
+ return ConfederationManager.outcome(database, proposalId, secret)
+ }
+
override suspend fun record(event: Event): Boolean = ConfederationManager.record(database, event)
override fun observeUnpublished(): Flow> =
diff --git a/composeApp/src/commonMain/kotlin/mobi/giza/compose/managers/ConfederationManager.kt b/composeApp/src/commonMain/kotlin/mobi/giza/compose/managers/ConfederationManager.kt
index 733b8d45..62a6b66c 100644
--- a/composeApp/src/commonMain/kotlin/mobi/giza/compose/managers/ConfederationManager.kt
+++ b/composeApp/src/commonMain/kotlin/mobi/giza/compose/managers/ConfederationManager.kt
@@ -22,6 +22,8 @@ import mobi.giza.compose.nostr.confederation.ConfederationProposalEvent
import mobi.giza.compose.nostr.confederation.ConfederationProposalRejectionEvent
import mobi.giza.compose.nostr.confederation.ConfederationProposalWithdrawalEvent
import mobi.giza.compose.nostr.confederation.ConfederationSeal
+import mobi.giza.compose.nostr.confederation.ConfederationProposalState
+import fr.acinq.bitcoin.PrivateKey
import mobi.giza.compose.nostr.confederation.ConfederationStatus
import mobi.giza.compose.nostr.frost.GroupKeyStateEvent
@@ -363,4 +365,69 @@ object ConfederationManager {
sealed.content,
)
}
+
+ /**
+ * What the coordinator's device can say once every group has accepted (docs/confederation.md,
+ * Phase 8): each group's admins and threshold, opened from its acceptance with the
+ * coordinator's own key, and what stands between them and a key ceremony.
+ *
+ * Stores nothing: every input is already on file, so it is read again each time.
+ */
+ data class Outcome(
+ val status: ConfederationStatus,
+ /** Each group's opened admin list, or null where its acceptance does not open to a list for it. */
+ val adminLists: Map,
+ /** Every admin across every group, counted once per group they sit in: upstream's roles. */
+ val roleCount: Int,
+ /** Admins who sit in more than one of the groups, with those groups. Allowed; each needs a host key per group. */
+ val overlaps: Map>,
+ /** What has to be put right before a ceremony could start. */
+ val problems: List,
+ /** What the coordinator should know but that stops nothing. */
+ val notes: List,
+ ) {
+ val ready: Boolean get() = status.state == ConfederationProposalState.ACCEPTED && problems.isEmpty()
+ }
+
+ suspend fun outcome(database: GizaDatabase, proposalId: HexKey, coordinatorSecret: PrivateKey): Outcome? {
+ val status = status(database, proposalId) ?: return null
+ val proposal = status.proposal
+ if (coordinatorSecret.publicKey().xOnly().value.toHex() != proposal.coordinator) return null
+
+ val secret = coordinatorSecret.value.toByteArray()
+ val adminLists = proposal.groupPublicKeys.associateWith { group ->
+ status.acceptances[group]?.let { acceptance ->
+ ConfederationSeal.open(ConfederationSeal.conversationKey(secret, acceptance.ephemeralPublicKey), acceptance.content)
+ ?.takeIf { it.proposalId == proposal.id && it.group == group }
+ }
+ }
+
+ val problems = mutableListOf()
+ val notes = mutableListOf()
+ if (status.state != ConfederationProposalState.ACCEPTED) problems += "Not every group has accepted"
+ adminLists.filter { (group, list) -> status.acceptances[group] != null && list == null }.keys.forEach { group ->
+ problems += "${nameOf(database, group)}'s acceptance does not open to its admins"
+ }
+ val roleCount = adminLists.values.filterNotNull().sumOf { it.admins.size }
+ if (roleCount > ConfederationKinds.MAX_ROLES) {
+ problems += "$roleCount admins in all, more than the ${ConfederationKinds.MAX_ROLES} one confederation can hold"
+ }
+ if (roleCount > ConfederationKinds.MAX_ANALYSED_ROLES) {
+ notes += "With more than ${ConfederationKinds.MAX_ANALYSED_ROLES} admins, which coalitions could sign or block cannot be worked out in advance"
+ }
+ proposal.groupPublicKeys.forEach { group ->
+ if (database.profileDao().getProfileByPublicKey(group)?.isResolved() != true) {
+ problems += "No public profile found for ${nameOf(database, group)} on this device"
+ }
+ }
+ val overlaps = adminLists.entries
+ .flatMap { (group, list) -> list?.admins.orEmpty().map { it to group } }
+ .groupBy({ it.first }, { it.second })
+ .filterValues { it.size > 1 }
+ overlaps.forEach { (admin, groups) ->
+ notes += "${nameOf(database, admin)} is an admin of ${groups.size} of these groups, and would hold a key for each"
+ }
+
+ return Outcome(status, adminLists, roleCount, overlaps, problems, notes)
+ }
}
diff --git a/composeApp/src/commonMain/kotlin/mobi/giza/compose/repository/ConfederationRepository.kt b/composeApp/src/commonMain/kotlin/mobi/giza/compose/repository/ConfederationRepository.kt
index 152d86b8..71c60d57 100644
--- a/composeApp/src/commonMain/kotlin/mobi/giza/compose/repository/ConfederationRepository.kt
+++ b/composeApp/src/commonMain/kotlin/mobi/giza/compose/repository/ConfederationRepository.kt
@@ -61,6 +61,9 @@ interface ConfederationRepository {
suspend fun proposeWithdrawal(localChatRoom: LocalChatRoom, userPublicKey: HexKey, proposalId: HexKey): FrostSigningSession
+ /** What the coordinator's device can say once every group has accepted, or null on any other device. */
+ suspend fun outcome(proposalId: HexKey): ConfederationManager.Outcome?
+
/** A signing session this room has open over an answer to [proposalId], if any: one at a time. */
fun observePendingAnswer(chatRoomId: String, proposalId: HexKey): Flow
@@ -92,6 +95,7 @@ interface ConfederationRepository {
override suspend fun proposeWithdrawal(localChatRoom: LocalChatRoom, userPublicKey: HexKey, proposalId: HexKey): FrostSigningSession =
throw UnsupportedOperationException("No confederation here")
override fun observePendingAnswer(chatRoomId: String, proposalId: HexKey): Flow = flowOf(null)
+ override suspend fun outcome(proposalId: HexKey): ConfederationManager.Outcome? = null
}
}
}
diff --git a/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/composable/ConfederationProposalScreen.kt b/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/composable/ConfederationProposalScreen.kt
index f64de9da..501f345f 100644
--- a/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/composable/ConfederationProposalScreen.kt
+++ b/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/composable/ConfederationProposalScreen.kt
@@ -51,6 +51,8 @@ import mobi.giza.compose.resources.confederation_groups_to_act
import mobi.giza.compose.resources.confederation_proposal
import mobi.giza.compose.resources.confederation_proposed_by
import mobi.giza.compose.resources.coordinated_by
+import mobi.giza.compose.resources.every_group_accepted_admins_across_groups
+import mobi.giza.compose.resources.the_key_ceremony_is_not_available_yet
import mobi.giza.compose.resources.could_not_ask_the_group_to_answer
import mobi.giza.compose.resources.open_the_signing_session
import mobi.giza.compose.resources.open_until
@@ -190,6 +192,27 @@ fun ConfederationProposalScreen(
)
}
+ // The coordinator's end of Part A: each group's admins opened, and
+ // what stands between them and a key ceremony. docs/confederation.md, Phase 8.
+ current.outcome?.let { outcome ->
+ HorizontalDivider()
+ Text(
+ text = stringResource(Res.string.every_group_accepted_admins_across_groups, outcome.roleCount, proposal.groups.size),
+ style = MaterialTheme.typography.bodyMedium,
+ )
+ outcome.problems.forEach { problem ->
+ Text(text = problem, style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.error)
+ }
+ outcome.notes.forEach { note ->
+ Text(text = note, style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant)
+ }
+ Text(
+ text = stringResource(Res.string.the_key_ceremony_is_not_available_yet),
+ style = MaterialTheme.typography.bodySmall,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ )
+ }
+
current.pendingSessionId?.let { sessionId ->
HorizontalDivider()
Text(text = stringResource(Res.string.waiting_for_the_group_to_sign_its_answer))
diff --git a/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/composable/navigation/GizaNavHost.kt b/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/composable/navigation/GizaNavHost.kt
index 9fd7c2d5..d6504a25 100644
--- a/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/composable/navigation/GizaNavHost.kt
+++ b/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/composable/navigation/GizaNavHost.kt
@@ -217,7 +217,8 @@ fun GizaNavHost(
val databaseConfederationRepository = remember {
DatabaseConfederationRepository(
database = auxDatabaseManager.auxDatabase,
- applicationIOScope
+ applicationIOScope,
+ activeIdentity = sovereignWalletViewModel.activeIdentity,
)
}
val databaseMarmotRepository = remember {
diff --git a/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/view/model/ConfederationProposalViewModel.kt b/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/view/model/ConfederationProposalViewModel.kt
index ffe90dc3..e58a1777 100644
--- a/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/view/model/ConfederationProposalViewModel.kt
+++ b/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/view/model/ConfederationProposalViewModel.kt
@@ -16,6 +16,7 @@ import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import mobi.giza.compose.database.model.FrostSigningSession
+import mobi.giza.compose.nostr.confederation.ConfederationProposalState
import mobi.giza.compose.repository.ChatRepository
import mobi.giza.compose.repository.ConfederationRepository
import mobi.giza.compose.ui.view.state.ConfederationProposalUIState
@@ -65,6 +66,11 @@ class ConfederationProposalViewModel(
pendingSessionId = pending?.id,
canSign = canSign,
isActing = acting,
+ outcome = if (status.state == ConfederationProposalState.ACCEPTED) {
+ runCatching { confederationRepository.outcome(proposalId) }.getOrNull()
+ } else {
+ null
+ },
)
}
}
diff --git a/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/view/state/ConfederationProposalUIState.kt b/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/view/state/ConfederationProposalUIState.kt
index 103f2751..66282979 100644
--- a/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/view/state/ConfederationProposalUIState.kt
+++ b/composeApp/src/commonMain/kotlin/mobi/giza/compose/ui/view/state/ConfederationProposalUIState.kt
@@ -2,6 +2,7 @@ package mobi.giza.compose.ui.view.state
import com.vitorpamplona.quartz.nip01Core.core.HexKey
import mobi.giza.compose.database.model.intermdiate.LocalChatRoom
+import mobi.giza.compose.managers.ConfederationManager
import mobi.giza.compose.nostr.confederation.ConfederationStatus
/** One proposal, seen from one of the groups it names (docs/confederation.md, Phase 7). */
@@ -16,6 +17,8 @@ sealed interface ConfederationProposalUIState {
/** Whether this device can put an answer to the group: an open room and a share. */
val canSign: Boolean = false,
val isActing: Boolean = false,
+ /** On the coordinator's device once every group has accepted: what it can say about forming it. */
+ val outcome: ConfederationManager.Outcome? = null,
) : ConfederationProposalUIState {
private val roomId get() = localChatRoom.chatRoom.id
diff --git a/composeApp/src/jvmTest/kotlin/mobi/giza/compose/managers/ConfederationNetworkJvmTest.kt b/composeApp/src/jvmTest/kotlin/mobi/giza/compose/managers/ConfederationNetworkJvmTest.kt
index 0ec0e0cd..84029bd8 100644
--- a/composeApp/src/jvmTest/kotlin/mobi/giza/compose/managers/ConfederationNetworkJvmTest.kt
+++ b/composeApp/src/jvmTest/kotlin/mobi/giza/compose/managers/ConfederationNetworkJvmTest.kt
@@ -12,6 +12,7 @@ import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
+import kotlin.test.assertTrue
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.runBlocking
import mobi.giza.compose.database.GizaDatabase
@@ -224,4 +225,37 @@ class ConfederationNetworkJvmTest {
lines.sorted(),
)
}
+
+ @Test
+ fun `the coordinator's device says what forming it would take, and nobody else's says anything`() = runBlocking {
+ val proposalId = proposeAtlas()
+ signed(polis) { ConfederationManager.proposeAcceptance(it.db, it.room, it.publicKey, proposalId).id }
+ signed(ekklesia) { ConfederationManager.proposeAcceptance(it.db, it.room, it.publicKey, proposalId).id }
+
+ val coordinator = agora.devices[0]
+ // D2 at the coordinator: each group's profile has come back from the relays.
+ groups.forEach { group ->
+ val eventId = "f${group.index}".padEnd(64, '0')
+ coordinator.db.nostrEventDao().upsert(NostrEvent(id = eventId, pubKey = group.roomId, kind = 0, tags = emptyArray(), content = "{}", sig = "0".repeat(128)))
+ coordinator.db.profileDao().upsert(Profile(publicKey = group.roomId, nostrEventId = eventId, displayName = group.name, createdAt = kotlin.time.Instant.fromEpochSeconds(1_790_000_000)))
+ }
+
+ val outcome = assertNotNull(ConfederationManager.outcome(coordinator.db, proposalId, agora.secrets[0]))
+ assertTrue(outcome.ready, "${outcome.problems}")
+ assertEquals(9, outcome.roleCount)
+ assertEquals(emptyMap(), outcome.overlaps)
+
+ assertEquals(null, ConfederationManager.outcome(polis.devices[0].db, proposalId, polis.secrets[0]), "only the coordinator's key opens them")
+ }
+
+ @Test
+ fun `a group without a public profile at the coordinator is named as what stands in the way`() = runBlocking {
+ val proposalId = proposeAtlas()
+ signed(polis) { ConfederationManager.proposeAcceptance(it.db, it.room, it.publicKey, proposalId).id }
+ signed(ekklesia) { ConfederationManager.proposeAcceptance(it.db, it.room, it.publicKey, proposalId).id }
+
+ val outcome = assertNotNull(ConfederationManager.outcome(agora.devices[0].db, proposalId, agora.secrets[0]))
+ assertEquals(false, outcome.ready)
+ assertEquals(3, outcome.problems.count { it.startsWith("No public profile found") })
+ }
}
diff --git a/composeApp/src/jvmTest/kotlin/mobi/giza/compose/managers/ConfederationStorageJvmTest.kt b/composeApp/src/jvmTest/kotlin/mobi/giza/compose/managers/ConfederationStorageJvmTest.kt
index ce9af1a5..6758ebdf 100644
--- a/composeApp/src/jvmTest/kotlin/mobi/giza/compose/managers/ConfederationStorageJvmTest.kt
+++ b/composeApp/src/jvmTest/kotlin/mobi/giza/compose/managers/ConfederationStorageJvmTest.kt
@@ -167,4 +167,19 @@ class ConfederationStorageJvmTest {
lines(npub(2)).map { it.messageType },
)
}
+
+ @Test
+ fun `an admin of two groups is counted twice, and said so`() = runBlocking {
+ val shared = npub(21)
+ listOf(proposal,
+ ConfederationTestGroups.acceptance(agora, proposal, admins),
+ ConfederationTestGroups.acceptance(polis, proposal, listOf(shared, npub(31), npub(32))),
+ ConfederationTestGroups.acceptance(ekklesia, proposal, listOf(npub(41), npub(42), npub(43))),
+ ).forEach { ConfederationManager.record(db, it) }
+
+ val outcome = kotlin.test.assertNotNull(ConfederationManager.outcome(db, proposal.id, key(9)))
+ assertEquals(9, outcome.roleCount)
+ assertEquals(listOf(npub(1), npub(2)), outcome.overlaps[shared])
+ assertTrue(outcome.notes.any { it.contains("would hold a key for each") })
+ }
}
diff --git a/docs/README.md b/docs/README.md
index e623b6e0..cb94938f 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -15,7 +15,7 @@ the [retired](./retired/) notes now.
| [shared-key-ceremony.md](./shared-key-ceremony.md) | ChillDKG over NIP-17: the rounds, the approval gates, the chat transcript, participant ordering |
| [shared-key-derivation.md](./shared-key-derivation.md) | deriving further keys from the group's threshold key with FROST tweaks — why not BIP32, why no chain code, and the one rule that must not be broken |
| [subgroups.md](./subgroups.md) | a group making another group — the four ceremonies, what the parent's signature actually covers, and why the child's key is fresh rather than derived |
-| [confederation.md](./confederation.md) | a group made of groups: a phased plan, not built. Groups with a public nostr profile propose, accept or reject a confederation in public, an acceptance carries the group's admins sealed to the coordinator in a way every signer recomputes, and the confederation's DKG and Marmot room follow. Covers why the public events are regular kinds, why nothing can be encrypted from or to a group's npub, how the coordinator is kept from substituting a roster, and why everything after the agreement waits on upstream publishing the distributed rounds |
+| [confederation.md](./confederation.md) | a group made of groups: a phased plan, Part A (phases 0-8) built behind a flag that is off in release, Parts B and C waiting on upstream. Groups with a public nostr profile propose, accept or reject a confederation in public, an acceptance carries the group's admins sealed to the coordinator in a way every signer recomputes, and the confederation's DKG and Marmot room follow. Covers why the public events are regular kinds, why nothing can be encrypted from or to a group's npub, how the coordinator is kept from substituting a roster, and why everything after the agreement waits on upstream publishing the distributed rounds |
| [automatic-key-ceremony.md](./automatic-key-ceremony.md) | joining is the only approval: a phased plan, built but for its device session, that makes a key ceremony run by itself after a member joins. Covers why contributing and confirming were never decisions a person could add to, the resume sweep that replaces the tap, the coordinator's follow-up steps and the one key state a device can sign without asking, and why abandon stays |
| [ceremony-creation.md](./ceremony-creation.md) | one place to start a key ceremony — how joining a subgroup's ceremony opened a second one for the parent room, the screen that showed a ceremony and offered to start one in the same button, and the removal of the nip30303 documents, whose kinds collided with the ceremony's, leaving the member chronicle with nothing to carry and nothing to say |
| [frost-batch-signing.md](./frost-batch-signing.md) | signing several events in one ceremony — why one nonce can never cover two messages, and the phased schema, wire and UI work that follows from it |
diff --git a/docs/confederation.md b/docs/confederation.md
index 4b6e7997..b53d88df 100644
--- a/docs/confederation.md
+++ b/docs/confederation.md
@@ -35,8 +35,31 @@ Read these first:
the cryptography this plan ends on, and why that cryptography cannot run across devices
yet.
-Written against `c9e6f07c` on 2026-11-21. Phases 0 to 8 can be built now. Phases 9 to 16
-wait on upstream (see the next section).
+Written against `c9e6f07c` on 2026-11-21. **Part A is built** (phases 0 to 8) on
+`claude/confederation-implementation-plan-a24dc6`, one commit per phase, behind
+`ExperimentalFeatures.confederation`. Phases 9 to 16 wait on upstream (see the next section).
+jvmTest went from 1,569 to 1,601, all passing, and `./gradlew check` passes: `m3Audit`, `brandAudit` and `walletAudit` are at
+their budgets, and `compileDebugKotlinAndroid` builds.
+
+**Not done:** nothing here has run on a device. No proposal has crossed real relays between
+real groups, and no iOS build has been made. The phases are kept as written, because they are
+the reasoning. Where the build chose differently:
+
+| what the plan said | what it turned out to be |
+|---|---|
+| D4: `canSign` means admin | not while refresh is experimental: a demoted admin keeps a share. The coordinator is also checked against `RoomAdmins.of`, on the form and on every signer (Phase 0) |
+| Phase 3, then Phase 4 | 4 first. A refusal has to outlive the proposal's arrival (approval checks again, the decline says why, a resend carries the seal), so it needed somewhere to live |
+| Phase 4: `ConfederationProposal` and `ConfederationAnswer` tables, a `ConfederationGroup` cache | one `ConfederationEvent` table for every kind, `ConfederationInvitee` to find proposals by group, and `ConfederationSigning` per signing session. No cache: D2's lookups land in the `Profile` rows the profile preview already writes |
+| D5: the seal's secret rides the FROST proposal | and so does the proposal an answer answers (`confederation_proposal`), signed and verified like a relay's copy, so a signer does not depend on its relays having delivered it |
+| D8: an expiry passed before `ACCEPTED` | an answer counts only if its own `created_at` is by the expiry, so whether a proposal was accepted in time does not depend on when a device heard of it |
+| D9: `frostSigningSessionId` on the proposal row | `ownSessionId` and `publishedAt` on every `ConfederationEvent`, set by `onSigned` on the coordinating device and drained by `ConfederationPublisher` with backoff |
+| Phase 5: subscribe on the bootstrap relays and the hints | on the publish set, where the publisher sends. Hints add targets when publishing |
+| Phase 6: relay hints on the proposal's `p` tags | written empty. The profile lookup does not say which relay answered |
+| Phase 6: an `…_EXPIRED` line | none. Nothing happens at an expiry to write one from; the state says it |
+| Phase 6: the form's state as a Compose state | a `MutableStateFlow` updated atomically. A lookup settling on an IO thread and a group added on the main one lost updates under the full suite |
+| Phase 7: invitations feed `observeProposalsAwaitingYou` | not done. That feed is shaped around FROST sessions; the transcript line is the notice |
+| Phase 7: the run on `SignedGroupKeyStateTest`'s harness | `ConfederationNetworkJvmTest`, its own three groups of three devices each, with real FROST signatures and relays as copies. It found an answer filed before its proposal losing its line; a proposal now writes the lines for answers already held |
+| Phase 8: the coordinator decrypts | with the active identity's own key, so an npub-only identity that coordinated (it cannot, since it cannot propose) would see nothing |
## Progress
@@ -50,6 +73,7 @@ wait on upstream (see the next section).
| 5 | done. `ExperimentalFeatures.confederation`, on in development builds. `LiveSubscriptionManager` holds `live-confederation` on the publish set while it is on: every confederation kind `#p`-tagged to one of our Marmot rooms, and every answer `#e`-tagged to a proposal not yet expired, re-sent when either changes. What arrives goes to `ConfederationRepository.record`, never `saveNostrEvent`. `FrostSigningManager.complete` calls `ConfederationManager.onSigned`, which files the signed events on every device and, on the coordinator's, marks them owed (`ConfederationEvent.ownSessionId`, `publishedAt`, folded into schema 43 since it has not shipped). `ConfederationPublisher`, run by `SynchronizationViewModel`, sends owed events to the publish set and the proposal's hints and backs off from a minute to half an hour until a relay takes each. `BROADCASTABLE_KINDS` gains 9430–9433. `ChatMessage.applyInnerEvent` draws nothing for these kinds rather than a raw-JSON bubble. `ConfederationRelayTest` 6/6, `ConfederationStorageJvmTest` 7/7 |
| 6 | done. Four system lines (`TYPE_CONFEDERATION_PROPOSED`, `…_ACCEPTED`, `…_REJECTED`, `…_WITHDRAWN`) written by `ConfederationManager.record` in every local room the proposal names, once per event because the event row is written once. No line for an expiry: nothing happens at an expiry to write one from. A "Confederations" row on the group's screen while the flag is on, for every member of a Marmot room. `ConfederationsScreen` watches every proposal naming the group. `ProposeConfederationScreen` looks every group up on the relays, this one included, and its button waits on a name, an admin, a share, a group that can take part and every group found. Relay hints are not written yet: the profile lookup does not say which relay answered. Its view model's state is a `MutableStateFlow` updated atomically, because a lookup settling on an IO thread and a group added on the main one lost updates under the full suite. `ConfederationRepository.NO_OP_CONFEDERATION_REPOSITORY` for fakes. `ProposeConfederationViewModelJvmTest` 8/8, `ConfederationScreensJvmTest` 4/4, `ConfederationStorageJvmTest` 9/9. jvmTest 1,591, `m3Audit`, brand and wallet audits clean |
| 7 | done but for the badge. `ConfederationProposalScreen`, opened from each card: the proposal, its coordinator, every group's answer, and for a member with a share either both answers (in an invited group that has not answered) or withdrawal (in the proposing group), giving way to a pending answer's session. The approval screen shows D6's notes: the groups by name, `T`, the coordinator, what an acceptance discloses, and each listed group with no public profile on this device, as a warning. `ConfederationNetworkJvmTest` 3/3 is the plan's three-group run: real FROST signatures per group, relays as copies, every device on every group agreeing on `REJECTED` and then on `ACCEPTED`, and the coordinator opening each group's admins. It found answers filed before their proposal losing their line, since a proposal and its proposer's acceptance share a second and relay order is by id; a proposal now writes the lines for answers already held. **Not done:** invitations do not feed `observeProposalsAwaitingYou`, which is FROST-session shaped; the transcript line is the notice. jvmTest 1,598 |
+| 8 | done. `ConfederationManager.outcome` on the coordinator's device opens each acceptance with the active identity's key, checks each list names its group and proposal, counts roles (refusing more than 128, noting more than 16), names any listed group with no public profile on this device as what stands in the way, and lists admins who sit in more than one group. The proposal screen shows it once every group has accepted, ending on "the confederation's key ceremony is not available in this version yet". Withdrawal was built with the answers in Phases 3 and 7. `ConfederationNetworkJvmTest` 5/5, `ConfederationStorageJvmTest` 11/11 |
---