The guard Phase 1 left out. A confederation's name is signed into its
proposal and charter and compared byte for byte, so it must never be made
bare once it exists. ConfederationPeople takes the name its proposal is
signed under; ConfederationBracedNameJvmTest forms one as {Atlas} and checks
every device stores it exactly, the charter built from it is signed on
every device, and ConfederationChangeRefusal declines the same charter with
the braces taken off. All three fail if membership applies bare.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs that described a stored & now describe a bare name drawn in
braces: shared-key-ceremony.md, subgroups.md, confederation.md,
nip17-multiple-ceremonies.md and automatic-key-ceremony.md. Earlier build
records are left as written. group-name-prefix.md says it is superseded.
group-name-braces.md has its status and build notes, and both README rows
are updated.
Renames a Welcome test whose name said Bennu, which the brand audit fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every fixture and preview that seeded a Marmot room as &Name now seeds Name,
as the app stores it, and draws {Name}. An & stays only where a test is about
the legacy mark: the name rule's table, the Welcome and migration tests, the
duplicate-name check, and ConfederationStorageJvmTest's room, which says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The confederation's transcript lines (proposed, invited, accepted, declined,
withdrawn, formed, charter signed) and its profile-change notes draw its name
as {{name}} as they are written (D6). The signed name itself is untouched.
ConfederationManager.nameOf draws a group named by its room as {name}; a
group's profile name and the npub fallback stay plain. Lines already written
keep what they said.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema v55 changes no shape. MarmotGroupBareNameMigrationSpec runs v53's
body again, now renameMarmotRooms, so a device that stored &name at v53
stores name, which the app draws as {name}. NIP-17 rooms and confederations
are not touched. 55.json matches 54.json apart from the version.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A room is created, signed into a birth certificate and joined from a Welcome
under its bare name; the braces are only drawn. MarmotGroupName.of and the
stored & are gone, and v53's spec applies bare, so a device upgrading from
before v53 goes straight to bare names.
The subgroup-certified line is written with the name drawn in braces (D6),
moved up from Phase 4 because it was the last caller of of(). The two
duplicate-name checks compare names bare, so a room still stored as &Ekklesia
is taken by a typed Ekklesia (D8).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The braces are drawn, never stored. MarmotGroupName gets bare() for what is
stored and display() for what is drawn; ConfederationName draws {{name}}, and
its bare() runs only where a name is typed, never on one already signed.
ChatRoom.title draws a Marmot room's subject in braces and leaves a NIP-17
room's alone, and every screen that names a group or a confederation reads
through it. display() strips any stored mark first, so today's &name rooms
already draw as {name}; the writers still store &name until Phase 2.
Both name fields are framed in braces. The invite title moves into
strings.xml.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each group's signed acceptance already names the admins it puts forward, and
every admin must join for the ceremony to finish, so the tap could only say yes
or stall everyone. Once every group has accepted, each admin's device now joins
attempt 1 by itself, and follows a retry another person in the roster started,
but never starts one. Join holds a mutex so a tap and the device's own join
cannot send two different host-key messages. The accept and propose screens say
what accepting now commits each admin to.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The confederation signing lock is taken after Room's writer, never
before it, so a round heard in the room and through the inbox at once
no longer deadlocks the database.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A signing envelope reaches a group admin two ways at once. The room way
arrives inside storeNostrEvent's transaction, already holding Room's one
writer, and then waits for ConfederationSigningManager's mutex. The inbox
way took the mutex first and then waited for the writer. Each held what
the other wanted, and with Room's acquire timeout set to log, every other
write on the device queued behind them for good: chats and group details
stopped loading on every admin while a proposal was being signed.
propose, receive and resumeRunning now go through locked(), which takes
the writer before the mutex. On the room way the writer is re-entered;
on the inbox way it is waited for first. Holding the connection opens no
transaction, so each write still commits on its own, and nothing under
the lock goes to the network.
The new test hears one envelope both ways at once, holding the inbox way
just past the lock (lockedForTest) until the room way holds the writer.
With the old order it deadlocks and fails after 30 seconds; with this one
both file the round.
jvmTest 2,015, all passing; m3, brand and wallet audits pass;
compileDebugKotlinAndroid builds. Installed on three emulators, with no
writer timeouts after launch; no signing round run on them yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConfederationNetworkJvmTest forms a confederation on three groups of three, each with a real inbox
and a real MLS room, with one group's first admin never carrying. All nine devices reach one key,
and none holds a NIP-17 room or a ceremony gift wrap. ConfederationTestGroups.pumpConfederation
takes devices that do not carry.
The record: the plan's progress and where the build chose differently, the report marked as
implemented, the README rows, and since notes in the coordinator-free, profile and room-removal
plans. Nothing has run on a device or a real relay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Folded into schema 54's spec. A ceremony room is found by what it holds, a gift wrap of a ceremony
kind. Those rounds go with what hangs off them, and so do the ceremony's lines. The room goes only
if nothing else is left in it. A room's first payload is a key onto GiftWrapPayload, so the
reference is cleared before the rounds go: following it would have taken a founders' chat with it.
The foreign-key cascade both room migrations need is one helper now. ProtocolRetention loses its
rule for ceremony gift wraps, which nothing sends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A key ceremony's started, finished and failed lines, in each of a person's seat groups' rooms,
open the ceremony by its proposal. The banner that led from the ceremony's NIP-17 room goes,
with the composer gate on a finished one, proposalOfRoom and four strings.
The ceremony's screen says, under a step, when this device's own group holds a message of it
that no admin has yet carried to the others: "Sent; waiting for an admin of Agora to pass it on".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Joining makes no room. A person's messages go only into their seat groups' rooms, and each
group's admins carry them to every inbox. A failure goes back the same way, and the ceremony's
lines are written into those rooms. ConfederationCeremony loses chatRoomId and its key onto
ChatRoom, folded into schema 54. A ritual kind arriving as a gift wrap is dropped.
Joining now needs this device to hold the inbox key and the room of each of its seat groups. A
roster whose largest message would not fit one envelope is refused, computed from the exact size
of a dealing before anyone deals.
The ceremony tests run on the groups alone, including a carrier away, two of a group's three not
carrying, a seat without its inbox key, a round split across envelopes and a roster too large.
The profile network test forms its confederation over real group rooms and inboxes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConfederationBridge has two scopes: a formed confederation's signing, by its id, and a running
key ceremony, by its proposal. A ceremony's carriers work from the statements every admin holds,
so they need not have joined. Envelopes are filled to 26,000 bytes and a large round goes in
several, since a group's dealings can be far bigger than a relay takes in one wrap.
Every ceremony message is also written into each of its author's seat groups' rooms. It is read
there, and from the inboxes, through one path. The NIP-17 room still carries everything, and
the ceremony tests form the key over the groups' rooms and inboxes alone.
ConfederationTestGroups.Group is nested rather than inner: a clean compile left the inner class
without the Compose stability field its users read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A key ceremony message is now a signed event, never published, inside a 30379 envelope: the
ceremony's sibling of signing's 30398, a kind of its own for the ceremony's expiry floor. The
NIP-17 room still carries the envelopes. A receiver verifies each event before anything else,
drops a bare rumor of a ritual kind, and files what it reads as heard.
A person who signs two different messages for one step is named with both event ids, which
anyone holding them can check, where a NIP-17 seal could be denied. Abandoning takes the key,
since the failure it sends is signed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConfederationCeremonyHeard is the key ceremony's twin of ConfederationSigningHeard: every message
heard for a proposal's ceremony, kept without a foreign key, since a round can arrive before its
owner joins. It is released once the ceremony ends here, or after the ceremony floor when this
device holds none. ConfederationCarry gains a scope, every row before it a signing's.
The NIP-17 path files into it already, and a ceremony joined late replays from it beside the
stored gift wraps. Schema 54, with a spec later phases fold into.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five pins in ConfederationCeremonyJvmTest, each passing today and named for the phase that flips
it: a message leaves as a gift wrap p-tagged to every person, in the room of the people; a bare
unsigned ritual rumor is recorded; the bridge carries nothing for a proposal; it sends every due
event in one envelope whatever the bytes; and a ceremony row cannot exist without its room.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The report finds the key ceremony needs no NIP-17 room: its rounds can travel the bridge the
confederation's signing already uses. The plan builds that in eight phases.
Phase 0's checks are kept as ConfederationDkgInboxesPremiseJvmTest: 30379 is free; one role's
dealing size is an exact formula of T, the inner thresholds and the roles; a ceremony room's id
is any NIP-17 chat among the same people; every admin holds the group's inbox key. The byte
budget comes out at 26,000, not the planned 32,000, because NIP-44 pads in steps and a wrap
crosses 64 KiB well before its plaintext limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Posts and the charter now take the path profile changes already took
(docs/confederation-proposals.md): one group proposes a 9435 carrying the
unsigned kind:1 or 9434, the others endorse or object by their own quorum,
and the confederation signs once T groups have vouched, with nobody asked.
- ConfederationChangeStatements (was ...ProfileStatements) carries any
signable kind; a base only on a kind:0. The wire's "profile" tag keeps
its name so vouchers stay readable across builds.
- Refusals by kind: a blank post, an untrue or second charter.
- ConfederationSigningManager refuses anything without T groups'
vouchers; approve, decline and the per-person ask are gone.
- A charter supersedes a later charter; a post is never superseded.
- ConfederationScreen: "Profile changes" becomes "Proposals" for every
kind; Add post and Propose the charter start the group's session; the
Signing section, screen, view model and route are removed. Signing
lines open the proposal, an older line's attempt id resolved to it.
- Profile* types that now hold any kind renamed to Change*.
jvmTest 2,014, all passing; m3, brand and wallet audits at budget;
compileDebugKotlinAndroid builds. No device run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
giza took schema v52 for docs/confederation-room-removal.md, so the
rename of Marmot rooms from #name to &name moves to v53
(AutoMigration(52, 53)). ChatRoom is the same at both versions and
53.json matches 52.json apart from the version.
The confederation tests that conflicted take giza's side: the
confederation no longer has a room, and the &Atlas fixtures went with
it. The new fixtures giza added name groups &Agora, &Polis and
&${names[i]}.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The confederation's own Marmot room is gone (docs/confederation-room-removal.md): signing runs in
each group's room, carried between groups through their inboxes by the group's admins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On three real FROST groups with real inboxes, one of Agora's admins
proposes a post; the other eight are asked in their own groups' rooms,
approve, and every device signs it, files it as the confederation's post
and owes it to relays, with no room of the confederation's on any of them.
The plan's header and its table of where the build chose differently;
pointers from confederation.md Phase 13, confederation-without-coordinator.md
D11 and confederation-profile.md D5, D9, Phase 7 and its appendix, whose
rejected idea this plan took up. No device run.
Full jvmTest 2,001, all passing; m3, brand, wallet and Marmot audits pass;
compileDebugKotlinAndroid builds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConfederationFollowThrough is deleted, with its launch, the welcome that
replaced a held room and Confederation.roomCreator. A Welcome to an id
this device knows as a confederation's, by record or charter, is refused,
with the flag off too, and MarmotGroupCreation.create refuses that id.
Folded into schema 52, the migration drops roomCreator and every room
whose id is a confederation's, after its signed events are copied out.
Room migrates with foreign keys off, so nothing cascades from the room's
row there: the migration walks PRAGMA foreign_key_list from ChatRoom and
deletes every dependent row, children first.
roomIdOf is idOf and Held.roomKey is key: the id names no room.
Full jvmTest 2,000, all passing; m3, brand, wallet and Marmot audits pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConfederationScreen gains Posts (with Add post for someone who holds a
seat), Charter (signed, or Propose the charter for a seat-holder) and
Signing (their attempts, the ones waiting on them first), and loses Open
the confederation's room. The composer posts for a confederation through
AddGroupPostRoute's new confederationId.
A post or charter a role holder must answer is its own line,
TYPE_CONFEDERATION_SIGNING_ASKED, written into each of their groups'
rooms as theirs and classed as needing them. A signed post is owed to
relays by every device that signed it.
The room screens lose the confederation's card, its members' group
labels, ConfederationRoomInfo, confederationOfRoom, the room's charter
proposal and the confederation branches of the posts and profile view
models; four strings go, and the ceremony room's banner stops saying the
confederation works in its own room.
Full jvmTest 2,001, all passing; m3, brand, wallet and Marmot audits pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shared-key-ceremony, subgroups, confederation, nip17-multiple-ceremonies and
automatic-key-ceremony describe today's mark as &, pointing at
group-name-prefix.md for why it moved. Dated device-run logs that quote #
(ceremony-creation, mls-skipped-keys) are left as the record they are.
group-name-prefix.md and its README row now say built but for the device run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every test fixture, harness default and @Preview that seeded a group's name
under # now uses &, along with the comments that spelled a room #name. # is
left only where the old mark is the point: MarmotGroupNameTest's inputs, the
Welcome and migration tests, the legacy certificate in SubgroupManagerJvmTest
and the verbatim proposal summary in ProposedEventTest. Hashtags and #h
filters are untouched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parent's subgroup list and the TYPE_SUBGROUP_CERTIFIED line read the
certificate's name through MarmotGroupName.of, so a certificate signed before
the change matches the room it names. The proposal summary stays verbatim:
it shows what the signer is about to approve.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConfederationBridge: a signing message heard in a group's room, or
written there by this device's owner, is owed out by the group's current
admins who hold its inbox key, one at a time by their place, twenty
seconds apart, and only when its author holds a seat in that group or it
is the group's voucher. Out is one 30398 sealed as the admin to every
member group's announced inbox key, owed through GroupInboxPublication;
in is one envelope into the room, only where the group has a seated
member who reads no inbox. A copy seen back marks the turn done on the
other admins' devices. ConfederationCarry holds the turns (schema 52,
folded in).
GroupInboxManager.receive takes the identity's key and hands a 30398 to
the confederation. Signing proposes by the confederation's id and looks up
no room for it: its lines go into each seat group's room, and complete
files no GroupSignedEvent under the confederation. The profile
follow-through needs no room.
The signing fixtures carry no confederation room. New cases: no room
anywhere; each group's messages cross once; with the first admin away the
next carries twenty seconds on; a founder Agora has demoted keeps signing
through Agora's room; one Agora removed hears nothing.
Full jvmTest 1,996, all passing; m3Audit at budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarmotGroupNameMigrationSpec runs after an auto-migration with no change of
shape and rewrites ChatRoom.subject through MarmotGroupName.of for every
Marmot room (mlsGroupState IS NOT NULL), left or not. NIP-17 rooms keep
whatever their people called them, and the groups' MLS state is untouched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
processWelcome writes MarmotGroupName.of(roomName()) to ChatRoom.subject, so
a room an older Giza or a Bennu peer named #name, or another client named with
no mark, lands as &name like every room this device makes. The group's own
MLS state keeps what its creator wrote.
CurrentProfileKeyPackageJvmTest's room from another client is now joined as
&made elsewhere, which is D4 of the plan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every signing message, and a group's voucher, also goes into the room of
every group its author holds a seat in, beside the confederation's room,
which is still the channel that works until Phase 4. An envelope now names
the room it was written into: the same events written into two rooms made
one envelope id, and the second room's row overwrote the first's.
ConfederationPeople.withGroupRooms gives the per-person fixture each
group's room, inbox key and signed 10044, with members a test can demote
or remove.
Full jvmTest 1,991, all passing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarmotGroupName.PREFIX is now &, and of() strips any leading run of space,
# and & before putting one & back, so an old #name and a new &name normalise
to the same thing and the rule stays idempotent. New rooms, new subgroup
certificates and the subgroup name field all follow the constant.
Rooms already on a device keep # until the v52 migration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A signing message is now a signed event from its author's key, naming its
confederation and attempt, never published, and sent inside a 30398
envelope (ConfederationSigningEvents.CARRIED). Whoever carries an envelope
cannot change what is in it: a receiver verifies each event and drops one
that does not verify, comes from someone with no seat, or names another
confederation. The envelope arrives here rather than in Phase 4 because an
MLS inner event has no column for a signature.
A group's voucher is already its signed event, so it travels in an
envelope as itself; the 30396 wrapper is never sent, and one that arrives
is dropped (Phase 5, folded in). Declining signs too, so it takes the key.
Full jvmTest 1,988, all passing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan: one idempotent rule that accepts both marks and writes &, applied
where a room is minted and where a Welcome is joined, a v52 migration for the
rooms already on a device, and certified names normalised where they are shown
but verbatim where somebody is asked to sign them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema 52. A signing attempt hangs off the confederation's record rather
than a ChatRoom, every signing message heard is kept in
ConfederationSigningHeard and an attempt is rebuilt from there rather than
from the room's inner events, and the disappearing sweep forgets them once
their attempt ends. A post the confederation signs is filed in
ConfederationEvent beside its charter and profiles, and the migration
copies the ones already under the room there. Profiles and the profile
observers read ConfederationEvent alone; ConfederationRepository gains
observePosts.
Full jvmTest 1,986, all passing; m3Audit at budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six of the seven checks: a stranger's seal to an inbox is already pinned,
the bundle sizes are far under MAX_STATEMENT_BYTES, 30398 is free, the live
inbox filter has no since, and the hops are counted. Deleting a room's row
cascades most of its state, but MarmotGroupEvent, MarmotInnerEvent and
MarmotCommitResult name a room without a key onto it and need deleting by
hand. No emulator was reachable, so check 6 is not done.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The confederation's signing moves onto two channels that already exist:
each group's own Marmot room within a group, and the groups' inboxes
between them, carried by one admin at a time in order. The posts, charter
and signing attempts the room offered move to the confederation's screen,
and the rooms already on devices are dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A person seated in several of a confederation's groups sends a nonce,
confirmation and partial only for the seats the selection chose, but
record() dropped any per-person message that did not name every seat its
sender holds. Every such message was discarded on arrival and the
attempt waited at NONCES for good -- on the emulators, all three of the
confederation's attempts, its charter and two profiles. Only the
availability has to cover every seat now; the later rounds may name any
of the sender's own, and perRole still waits for each chosen one.
The signing screen folded each person's answers into one, so a yes for
two groups and a no for the third read as "Declined". It now answers
group by group, and on a profile says a no is a group that had not
endorsed it when the signing began, which is what it is: the third
group's voucher reached the devices two minutes after the attempt.
ConfederationSharedSeatsSigningJvmTest lays the seats out as the
emulators do and fails on the old check; the existing tests gave each
person one seat. Full jvmTest 1,982, all passing; m3Audit at budget;
compileDebugKotlinAndroid builds. No device run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A formed confederation's profile, decided by its groups
(docs/confederation-profile.md, Phases 0 to 8). Disappearing messages
had taken schema 50 first, so the confederation's column is v51,
AutoMigration(50, 51). In GroupInboxManager a profile statement goes to
the confederation before the inbox's NIP-40 expiry check, as the
formation's statements do. Full jvmTest 1,978, all passing; audits at
budget; compileDebugKotlinAndroid builds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three groups of three admins, signing by real FROST and holding real
inboxes, form a confederation the real way on nine devices, then decide
its profile: Agora proposes, Polis endorses, the first in the order
starts the signing and all nine finish it without being asked, every
admin reads it, every group's room says so, and a member of Polis who is
no admin hears it from a relay. A change another group objects to and
its proposer withdraws is never signed.
The plan's header and progress table. Full jvmTest 1,903, all passing;
audits at budget; compileDebugKotlinAndroid builds. No device run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The confederation's own room names its groups, each with the people who
hold its roles, labels each member with the groups they hold roles for,
says that admins who joined later are not in it, and opens the
confederation's screen from a member group this device is in.
The key ceremony's NIP-17 room, once the ceremony has made the
confederation, says so and leads to the confederation, and its composer
is hidden: anything typed there would reach the founding people as
people.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The signed kind:0 is owed by every device that signed it and sent to the
public relays and every member group's inbox relays. The live
confederation subscription also asks for each known confederation's own
kind:0, by its key, so a member who is not an admin and holds only the
charter hears the new profile, and each member group's room says so:
"Atlas has a new profile". An older profile heard late changes nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A group's voucher, signed beside its seals, is carried into the
confederation's room by the group's role holders (kind 30396). Once a
role holder's device holds T groups' vouchers for a change, the first in
the roster's order starts the signing, with ten minutes a place for
those after, and again after a backoff when an attempt fails. Each role
holder's device answers for its seats from what its groups said: yes
where the group vouched, no where it did not. Two attempts at once end
in the one whose id sorts first.
A kind:0 without enough vouchers, or older than one already signed, is
refused, so the confederation's room no longer edits its profile; posts
and the charter keep the direct path. The signed profile is filed under
the confederation and owed to relays by the device that started it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>