MemberWalletManager.request makes a random key, works out the group's
leaf and every inherited one, builds both descriptors, stores the key,
and only then puts the signed request into the group's room. It checks
the request the way every signer will before it goes, and a member who
holds a share of the group's key puts it to the group in the same step.
NewMemberWalletScreen is a consent screen first: who can take the
member's coins and after how long, who will see them, and that the
group is the recovery path -- then an optional label and one button.
Every refusal is named, and a member who does not know the group's key
can ask for it from there. Its entrances arrive with the profile's
guarded wallets (Phase 8) and the group's page (Phase 11).
GroupWalletRollout.MEMBER_WALLETS_ON_MAINNET is shut: the entrances are
offered on test networks only, since the member's own spend is the
first single-signer path the app has.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupWalletViewModel reads the room's own wallet policy through
ChatRepository.walletPolicyOf: a parent that decided guarded leaves the
guarded wallet alone, one that decided unguarded the plain one alone, and
an undecided subgroup or a root group keep what they had. openWallet will
not build a plain statement under a guarded policy, and OpenWalletAction
shows one button with a line saying the decision was the parent's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SelectSubgroupAdminsScreen gains a wallet section under the quorum
stepper: guarded (the default) or unguarded, carried to proposeRitual.
Under a guarded parent the unguarded row is shown disabled with its
reason, setWalletPolicy will not move off guarded, a retry is pulled back
to guarded, and refusal() refuses it -- D4. A parent whose guardian keys
do not read cannot make a guarded subgroup, which is now refused before a
ceremony rather than after.
SubgroupManager.walletPolicyOf is the one reader of a group's own policy,
reached through ChatRepository with guardiansOf. DkgJoinApprovalScreen
tells an admin what the subgroup's wallet will be before they join.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wallet screen's title and the row on the group's detail screen read
"<group name> onchain wallet" instead of "Group onchain wallet". A room
with no subject, and the wallet screen before its room has loaded, keep
the generic name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The group's detail screen loses its "Nostr profile", "Relays" and "Posts"
rows, and the six screens behind them go with them: the profile, its
editor, the relay lists, their editor, the posts and the composer. So do
the readers they stood on (GroupNostrProfile, GroupRelayList, GroupPost),
their ChatRepository methods, and 97 strings.
Two things go that were not named, because nothing else reaches them.
BroadcastGroupSignedEventScreen was only opened from those three screens,
so the app no longer sends a group-signed event to a relay, and
EventPublishTransport goes with it. "Propose event" accepted only a
profile, a post or a relay list, so it would refuse every paste;
ProposeGroupEventScreen and GroupEventProposal are removed, and with them
the detail screen's canEditNostrProfile gate. What is left of that block
is the wallet row, shown in Marmot rooms only.
The transcript keeps what it already holds. The three message types stay
as private legacy names in GROUP_IDENTITY_TYPES, as the curated-lists
types did, so rows already written stay system lines. A profile or relay
list arriving in a room now applies to nothing, so a signing session an
older build opened for one ends without a raw-JSON bubble. A kind:1 falls
through to "unsupported", which is what it was before posts existed.
ProposedEvent no longer describes the three kinds.
GroupSignedWorkRowsJvmTest now covers the wallet row and the absence of
the removed rows. The chronicle tests still use a profile, a relay list
and a post as their kinds; they compare GroupSignedEvent rows, which are
unchanged, so only ChronicleTestKinds' account of why is corrected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing navigated to the artifact, chapter, dialect or translation screens:
ArtifactDetailRoute, AddArtifactRoute and AddDialectRoute were never built,
and the other six were only reached from inside those screens. Removed with
their view models, UI states, routes, nav host entries, the repository behind
them, TranslationScaffold, DetailRow, and the 65 strings only they used. The
group details screen loses the document repository it stored and never read.
The string catalogue test now checks its escapes on a string that stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was no way to end a ceremony: ChillDKG has no "no" short of it, and
the approval screens pointed at an abandon action on the ritual screen that
did not exist. ChillDkgRitualManager.abandon now ends a running ceremony this
device is in, filing and broadcasting the same FAILURE a fault sends, and the
ceremony screen offers it behind a confirmation.
record() now ignores a FAILURE from anyone outside the ceremony. In a
parent's room every member can read a subgroup's proposal, so any of them
could otherwise end it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CreateSharedKeyScreen takes the quorum and a single button, and nothing
else. It refuses a Marmot room and a group of one with a reason, hands over
to a ceremony the group already has rather than offering a second, and
replaces itself with the ceremony once it is opened so back never returns to
an offer. The group details' Shared key button and the card shown when a
robust group was created without its ceremony both lead here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A guarded wallet's coins have a spender outside the room: a guardian can
take a coin the child's open spend wants, and the child can move one a
guardian's wants. Neither winner is a row in the loser's room, so the loser
sat signed and rebroadcast forever. The watcher now asks the chain, for a
signed spend Electrum has not heard of, which transaction took each coin;
once that one confirms, recordReplaced marks the spend replaced and settles
every other spend of the coin, as recordConfirmed does for the room's own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupSpend checks a spend as a guardian would sign it: every input under
the descendant's account, locked by the leaf's 12 blocks, signed over the
script-path sighash as the key the ancestor's walk reaches, and witnessed
with the leaf and its control block. The builder waits out the lock and
weighs the leaf; the signing manager proposes, accepts, signs and completes
it, and every signer reads the descendant's wallet from its own copy of the
statement. A guarded wallet row on the ancestor's wallet screen opens the
send form for it. Schema v27 adds GroupTransaction.guardedChatRoomId.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A member in both rooms carries a descendant's signed guarded statement into
an ancestor's MLS room as a 30333 notice, and can pass one on a generation
further. Every ancestor device believes it only when its own guardian root
reaches the key the statement names for it. The wallet screen lists the
guarded wallets below the group with what is within its reach, and the
statements this device can still carry up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A room whose certificate grants guardian keys is offered a guarded wallet,
with a plain one beside it, on test networks; mainnet waits behind
GroupWalletRollout.GUARDIANS_ON_MAINNET. A spend's account is the one the
statement opened, so its own spends sign the guarded addresses' key path,
and wallets are watched per descriptor rather than per xpub.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The group wallet's address list: every paid receive address, the
current one and the two after it, any unused one handed out as a QR
code, and the used change addresses -- docs/group-wallet-addresses.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The amount field shows its unit, how many sats are confirmed and free to
spend, and on mainnet the cap; a problem with the amount -- not whole,
too large, more than the group has, too small, over the cap -- is said on
the field in its error state instead of under the form. The send-everything
row is one 48dp toggleable target, and turning it off again finds the
amount typed. The wording of every reason is one function shared by the
field and the preview.
GroupSendScreenJvmTest types into the form on regtest and mainnet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SEND_AN_AMOUNT kept every network on send-all until a release had shipped
with no mislabelled change, which no release could do while the gate was
closed. It is removed: the send screen always offers the switch and the
amount, and on mainnet the existing 100,000 sat cap bounds what a change
bug could put at risk. Phase 3's end-to-end test is what stands in for
the release the gate was waiting for.
The view model test no longer branches on the constant, and a mainnet
test holds an amount to the cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tapping the current or a next address on the list opens it in a sheet
-- the receive card's QR code, selectable text and copy, titled with the
index so a member can say which one they gave. A used address has copy
and nothing else: copying is for checking, a QR code is for being paid.
The sheet closes itself, with "Address N was just paid", when Electrum
reports a payment to the address it is showing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two open spends with change both paid to the first unused change
address, since a spend waiting for signatures has not used it yet.
Change indices are now reserved like coins: reservedChangeIndices reads
the claims of every open spend, and the builder takes the lowest watched,
unused, unheld index. It chooses among generated addresses only, so
change never lands outside the window; CHANGE_LOOKAHEAD rises to 10 and
past it a spend with change returns TooManyOpen.
The change branch not having answered is FindingChange rather than
NothingToSpend, and change too small to send back is reported as
Built.absorbed and said in the preview.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupWalletAddressesScreen, pushed from an "All addresses" button in the
wallet screen's receive card: index, address, and what each has been
used for, newest first, with the current address on the secondary
container and a copy button on every row. Its view model reads the
wallet GroupOnchainWallets already holds, so the list costs no
subscriptions and agrees with the wallet screen about which address is
current.
FakeElectrum moves out of GroupOnchainWalletJvmTest so the view model's
test can drive a chain too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gated amount field read its text by dropping every non-digit, so
21000.5 became 210,005 sats and 0.0005 became 5. parseSats accepts
thousands grouping and refuses decimals, grouping that groups nothing,
non-ASCII digits and more sats than exist; the preview reports which.
The field shows plain digits grouped and keeps what was typed.
Also plans the rest in docs/group-send-an-amount.md: send-an-amount
opens on every network at once, held on mainnet by the existing cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wallet screen's title, the room's detail row, the button that opens
one and the proposal summary a member agrees to all said "group wallet".
They now say "group onchain wallet", which is what it holds, and agrees
with GroupOnchainWallet in the code. Sentence case, as every string is.
Resource keys are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every conflict was the curated-lists removal on bennu meeting a wallet
line added beside it: the removal is taken and the wallet lines kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupWalletRollout holds the three gates, each with what lifts it. The
flag is on, its condition met. Send-an-amount is off, so the form sends
everything confirmed to one address and says so. A spend proposed from
this device on mainnet may send at most 100,000 sats; test networks
have no cap. The gates are on the composer and nothing else: a device
behind them still accepts, shows and signs what another member
proposes, through every check GroupSpend makes.
The plan is marked built, with its table of where the build chose
differently. Full JVM suite: 1474 tests, none failing; the Android
target compiles; every M3 budget is met.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every spend the room proposed, newest first, for every member whether
or not they have a node: what it sends and where it has got to --
waiting for signatures, abandoned, signed, sent (reported back by
Electrum, not merely broadcast), confirmed, or replaced by a later
spend. A signed spend Electrum has not reported can be sent again; a
signed, unconfirmed one can be bumped to twice its feerate, a new
session over the same coins that whichever confirms settles. Each row
opens its signing session.
Full JVM suite: 1473 tests, none failing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupSendRoute and GroupSendScreen, behind a Send button on the wallet
screen for a member who holds a share and has a node to see the coins
with. Address, amount or send everything, and a feerate prefilled from
Electrum's six-block estimate. The preview is GroupSpendBuilder over the
same inputs the proposal is built from -- what leaves, the fee, what
comes back as change, or why it cannot be built -- and proposing moves
onto the signing session, replacing the form.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupSpendBuilder: send-all, as Phoenix's final wallet does, and an
amount paid largest coin first with change to the next change address,
or to fees when it would be dust. Confirmed coins only, never one an
open spend already holds; the fee is exact before signing because every
witness is 64 bytes. Every built spend passes GroupSpend.check.
The signing screen draws a spend where it draws events: every output
with its address and amount, change labelled, the fee and feerate, and
the coins spent -- read from FrostSigningManager.checkedSpend, the
stored PSBT checked again, and unsignable when this device cannot check
it. The proposal list and the chat notice say "Spend from the group's
wallet". FrostSigningRepository gains proposeSpend, checkedSpend and
reservedOutPoints.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupWalletRoute and GroupWalletScreen, reached from a Group wallet row
on the group's screen. A group that has not opened a wallet gets an
empty state with, for a member who can sign, what opening one asks of
everybody -- including that shares are unencrypted at rest -- and the
button that proposes the statement. An open wallet shows the balance,
confirmed and on the way said apart, the next receive address as a
BIP21 QR code, selectable text and a copy button, the coins, and an
export of the two watch-only descriptors with what they give away.
The wallets are watched on the identity's own Electrum client and made
per PhoenixBusiness in BennuNavHost; a profile with no node sees the
wallet and is told it cannot watch the chain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bennu no longer speaks curare.to's list protocol. The schemas, templates,
entries and the suggestion queue go, with their six screens, routes, view
models, strings and tests, and the hooks into the group screen, the paste
proposal, proposal summaries, broadcast relay seeding, the chat repository
and the transcript.
The two transcript message types stay as private legacy names so rows
already stored still render as system lines rather than chat bubbles.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the packages to com.machankura.bennu.{compose,android,desktop}, the
Android applicationId to com.machankura.bennu.android and the iOS bundle
id to com.machankura.bennu.ios. The root project, launcher label, iOS
product, desktop window, user-facing strings, client tags and the
Curare* classes all say Bennu now.
Left alone on purpose: the mantra/ derivation tags, the `curated` desktop
data directory, the mantra.press relay and the curare.to references.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bulk control I argued against, built -- and the objection turned out to be
solvable rather than fatal, so it is worth recording what happened to it.
Half of it was already handled. Two resends in the same second do not collide
on the outbound row id: `broadcast` hashes that id over the session's own tags
and steps a second forward when it finds a collision rather than overwriting.
Different sessions were never at risk.
The other half was real. A resend publishes two messages, and `resend` keeps to
two deliberately because "publishing in bursts is what the skipped-keys bug
feeds on"; three proposals at once is six, in the same second that "two events
published in the same second race, and exactly one survives" was written about.
So the sessions are spaced rather than the budget quietly raised --
`resendAll` waits `RESEND_SPACING` between them, one second, which is the
resolution the protocol works in because `created_at` is stored to the second.
The pacing lives in the manager and not in the loop that wanted it, because
everything that justifies it does: MLS generations, relay ordering, outbound
ids. A caller that launched `resend` per session would put every burst into one
second, and the call site is the wrong place to know why that matters. There is
a test against the real manager that three sessions take longer than two
spacings and claim three different seconds.
What it acts on is `visible`, not the room: a bulk control reaching rows the
reader cannot see is its one unforgivable move. A cooling-down row is left out
of the count rather than included and skipped, because the count is what the
button says out loud and offering three while able to send two is a lie told
before the tap. Offered from two up: one is what the row's own button is for.
Every covered row goes quiet for the whole run rather than for its own turn --
a paced run means a row whose turn has not come is still about to publish, and
a row button offering to send it meanwhile would send it twice. A session
already in flight on its own is left out of the run for the same reason.
It is offered on any filter showing two it can act on, not only "being signed".
That filter is where it earns its place -- three rows stalled for one reason --
but the rule is about what is on screen, not about which chip put it there.
1419 jvm tests pass, the Android target compiles, all audit budgets met.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A row said "waiting for 2 of 3 members to take part" on the day a proposal was
made and on the day before it completed. That is the rule, not the progress.
Now it says "1 of 3 members have offered to sign", and on the next stage "2 of
3 signatures are in" -- the fractions that actually move.
Nothing is counted once it has ended, which is both endings and not only the
happy one. A signed session has nothing left to gather; an abandoned one has
counts frozen where they stopped, and "2 of 3" beside a failure invites the
reader to wait for a third that is never coming. The failure reason is what
that row has to say.
The denominators are the ones the protocol gates on. `orderedNonces` returns
nothing until `threshold` nonces have arrived and then takes the first
`threshold` of them, so the threshold is both what is needed and what is used --
the room's size is a bigger number nothing waits for. Once the signer set
exists it is the set being waited on, which is the same count from the other
side.
The numerator is the part that had to be got right. A nonce or a partial
signature is recorded with no check on who sent it, unlike a refusal, and
`orderedNonces` drops the ones from members holding no share when it
aggregates. So the tally joins `DkgParticipantMessage` on HOST_KEY and counts
members rather than rows: a count including strangers would have a row read
ahead of the coordinator, saying the group has what it needs while the session
sits still. That is the one direction a progress figure must never be wrong in,
and there is a DAO test for it. A count that still runs ahead -- a nonce
landing before this device runs `advance` -- is clamped, because a fraction
over one reads as a bug rather than as a session about to move.
The counts travel as their own `GROUP BY` flow, combined with the sessions in
the view model. They change far more often than the rows do, and carrying the
messages themselves would carry every nonce payload the room has ever exchanged
to a screen that only wants to count them.
The progress is its own line rather than a clause, so a reader scanning for the
one that is nearly there does not have to read a sentence to find out. That
left `statusOf` saying only who the reader is in the proposal, and since this
adds user-facing text its remaining literals moved to the catalogue with it --
nine strings that had been raw in the screen since before the catalogue rule.
1367 jvm tests pass, the Android target compiles, all audit budgets met.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A resend had one idea of who it was for at every stage -- the share
holders it had heard nothing at all from -- and that is a question only
the first stage can answer. A session reaches
COLLECTING_PARTIAL_SIGNATURES because enough members offered a nonce, so
every member who could be holding it up has been heard from: the set came
back holding the members who were never chosen and owe nothing, while the
chosen signer whose partial signature went missing was named nowhere.
Once the unchosen had answered or refused the set was empty, and the
control gave up before it reached the branch written for the stall it was
meant to repair.
So the set asks what the stage can answer. Of the signers the coordinator
chose, who has yet to send a partial signature -- which is the half of a
resend only they can carry out, since a partial signature is read by
nobody but the coordinator and no other device can repeat it. COMPLETE
keeps the old reading, and correctly: the signature is the coordinator's
own and nobody answers it.
The screen now asks the manager who is owed rather than deriving it from
the rows beside the button, the way it already asks about approvals: the
same reading decides whether a resend publishes anything, and two copies
of a rule that changes with the stage is a screen offering a knock the
manager would refuse. The transcript line and the notice say what the
members named are short of, since past the nonces they have answered once
already.
The test that looked like it covered this passed because it wrote the
stage into the row with no nonce on file anywhere -- a state the protocol
cannot produce, and exactly the state that hid the bug. It now reaches
the stage by offering a real nonce.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"In progress" was one chip over two situations that ask different things of
the reader, and collapsing them was the wrong call.
Short of members, a proposal can still die of indifference: refusals are
counted against `declinesThatAbandon`, so one more may end it, and a member who
is offline is indistinguishable from one who has not looked. It is also the
only stage the coordinator's resend is for. These are the proposals somebody
may have to do something about.
Once the signer set is written, none of that is true. `signerIds` is written
once and never revised, so no further refusal is counted against it, and what
is left is arithmetic the chosen devices have already committed to. Where one
asks whether this will happen, the other says it is happening.
So: WAITING_ON_MEMBERS and BEING_SIGNED, named for what the reader is waiting
on rather than for the protocol step -- "collecting nonces" is true and says
nothing. The icons carry it as well as the labels, people against machinery,
which is the only signal a monochrome display has.
What is *not* split, and the comments say why: whether this device was picked
to sign, and whether the reader agreed or declined. Those are facts about the
reader rather than states of the proposal, so they stay a sentence on the row.
Splitting on them would be splitting every state by who is looking.
The classification is now the stage plus one, which is the shape it was always
going to take -- the one being NEEDS_YOU, which no stage can express.
Six chips means the last two now sit past the fold at phone widths, so the
screen test measures order only over what the viewport lays out and the full
lifecycle order is pinned on the enum, where no viewport is involved.
1342 jvm tests pass, the Android target compiles, all audit budgets met.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Five chips under the app bar, each carrying its count, scrolling sideways. The
row is outside the list rather than its first item, because a control that
scrolls away is a control the reader has to scroll back for -- and the list it
filters is as long as the group's whole signing history. It scrolls rather than
wraps for the same reason from the other side: five counted chips do not fit
the sixty characters `readableContent` holds the column to at the largest text
size a reader can ask for, and a row reflowing to a second line moves the list
under the thumb about to tap it.
Unfiltered, the two sections stay. Filtered, they go: "waiting for you" against
"everything else" is a distinction the reader has already made by tapping, and
heading a single-state list with it would answer a question nobody asked.
A room with nothing in it gets no chips at all. Five chips reading 0 over an
empty screen would be five ways of saying what the empty state says once.
The screen also picks up the state widgets it never had -- `LoadingDataIndicator`,
`ErrorState` with an explicit `onRetry = null` because a room missing from this
device will not appear by looking again, and `EmptyState` with a message per
filter. That last one is the point: one shared default is how five different
absences here came to say one thing. A group never asked to sign and a queue
the reader has worked through are not the same fact, and the second is not an
absence at all -- it keeps the queue's own icon and reads as finished.
`initialFilter` reaches the screen and is applied in the view model's `init`,
so a `Loaded` handed in for a preview cannot open with its chips saying one
thing and its rows showing another. Nothing passes it yet.
Fourteen screen tests, and the audit's budgets all still met: 0 hardcoded
colours, 0 dp literals in spacing positions, 0 title-case strings, both floors
held. 1329 jvm tests pass; the Android target compiles.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The resend gets its affordance on the signing screen, below the member list and
above the approval block. The list is already the screen's answer to whose door
to knock on; this is the knock.
Coordinator only, and the state says why rather than leaving it to the button:
`acceptProposal` takes a session's coordinator from the author of the proposal
that opened it, so a resend from anybody else would have a member who was
missing the session believe the resender coordinates -- and then drop the real
coordinator's signer set.
`silent` is derived on the UI state rather than collected. Everything it is made
of is already there -- the share holders, who offered a nonce, who signed, who
refused -- and a second flow would be a second thing that can disagree with the
rows the screen draws. A member who refused is not silent: they answered.
The cooldown disables the button rather than hiding the section, because a
control that vanishes after a tap reads as one that failed, and what happened is
that it worked. `resend` hands back whether anything went out, so the snackbar
says which: asked again, or everyone has since answered and there was nobody
left to ask.
The transcript line gets its own icon. A resend must not read as a second
proposal, which is the one thing a session can never have -- two proposals under
one session id would be asking for two signatures out of one secret nonce.
`ask_again` already existed in the catalogue for re-querying a list's relays and
means exactly this, so it is reused rather than duplicated.
m3Audit: all budgets met. jvmTest: 1260 tests, no failures.
Plan: docs/frost-session-resend.md, Phases 5-7.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CuratedFieldType had no `date`, so a schema declaring one lost the field
at parse: entries were read without it, the accept flow copied a
suggestion into a canonical entry without it, validation never asked for
it, and the entry published cleanly -- and was refused by every client
that did know the type, for the required field it lacked. Fourteen of
bitcoin.necropolis.report's entries went out that way without a `died`.
`Date` is the NIP's tenth type: `YYYY`, `YYYY-MM` or `YYYY-MM-DD`, at
whatever precision the record allows, with `min` and `max` bounding the
year. `CuratedDate.parse` is the check -- month 1-12, day on the calendar
for that month and year, leap days included -- and the value is kept as
written. `checkValue` returns early the way the numeric branch does, so
`max` is a year and never a length cap. The value is not numeric, so
`isNumeric` stays false; `isBounded` is what the editor keys its min/max
inputs off instead, labelled as years for a date.
The root failure was wider than one type: any type this build does not
know was dropped the same way. A `field` tag of an unknown type is now
kept aside as CuratedUnsupportedField, the way CuratedFieldConfig.others
keeps unknown config keys. Reading is unchanged -- an entry is checked
against the fields a reader understands, which is the NIP's tolerance --
but the accept flow refuses to propose under a required one, naming the
type, and the schema editor carries it through an edit and writes it back
as it came, so re-signing a list here cannot change its rules unseen.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both sides had taken schema version 21: curated for the nullable
FrostSigningSession.signDeclinedAt (one refusal takes a member out of the n),
this branch for the Marmot current profile's three columns, with 22 and 23
behind it for the routing table and the publish obligations. Curated keeps 21.
This branch's three migrations move up one -- 21->22, 22->23, 23->24 -- and
the database is at 24; the comment on 22 says they moved and why.
The exported schemas for 22 and 23 could not be hand-edited, since each is a
snapshot of the whole entity set with an identity hash over it, and could
not be produced from the merged tree, which only exports its own version. So
each was regenerated the way the originals were: the tree of the commit that
introduced it (Phase 3 for 22, Phase 4 for 23), with curated's entity change
and its 21.json dropped in, the version bumped, and KSP run. The result is
what a device on curated's 21 migrates through: 22 adds the three columns
and nothing else, 23 adds MarmotRouting, 24 adds MarmotPublishObligation and
MarmotOutboundGate together with MarmotCommitResult.obligationId, and every
one of them carries signDeclinedAt. 24.json is the merged tree's own export.
Everything else merged itself: ChatMessage's kinds and line types, the
transcript's icons, the strings, the nav host. Full jvmTest 1220 green,
Android debug compile, M3 audit.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"Don't sign" ended the session for everybody: decline() failed it locally and
broadcast a FAILURE, which every other device failed on arrival. In a group
whose whole reason for running a ceremony was that no one member is needed,
one member's no was everybody's.
A refusal is now its own kind, DECLINE (30330), and one FrostSignerMessage per
member, like a nonce. Every device counts the refusals it has received from
ceremony participants against the same arithmetic -- FrostSigningSession.
declinesThatAbandon(), which is n - t + 1 -- and fails the session only on the
refusal that leaves fewer than t who could still sign. Nobody broadcasts the
abandonment, because nobody has to: each device reaches it the way each writes
its own transcript, and a FAILURE sent to say so would blame one member for the
group's arithmetic. In a 2-of-3 group the first refusal changes nothing the
other two can do; the second ends it. FAILURE keeps meaning abandon-and-blame,
for the faults no quorum can work around, and a build predating the new kind
still sends its refusals that way and is honoured as it always was.
decline() takes approve()'s shape: the decision goes on the row, as the new
nullable signDeclinedAt (Room v21, an AutoMigration), and advance() publishes
it whenever the row says so and no copy is on file -- so a device killed
between deciding and sending says it on the next message rather than never. A
member who refused is not asked again, but the session stays open around them
and closes when the group's signature arrives. Refusals from a member holding
no share of the key are turned away at the door.
fail() now leaves a COMPLETE session alone. A member who refused before their
device had seen the signature has refused something that no longer needed
them, and a late FAILURE used to flip a signed session to failed.
The transcript gets a TYPE_FROST_DECLINED line for a refusal the session
survives, with the count -- "declined to sign. It takes 2 of 3 members, and 2
could still sign." -- and the tipping refusal is written as the FAILED line in
that member's name, saying both that they declined and that it was the one
that ended it. A reader's own refusal settles their request line, and only
theirs; nothing earns a tick. The signing screen marks who declined and says
how many could still sign, and the proposal list says "You declined." where it
said "You agreed."
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The lifecycle of a current-profile room, through the publish gate. docs/marmot-v2.md,
Phase 7.
Leaving used to be a local flag and a "Left group" chat line: the group never
learned of it, and the leaf stayed in the tree holding the group's keys. A
current-profile room is now left the way v2 leaves: a standalone SelfRemove
proposal on the wire as a kind:445, the LEAVING gate raised first and durably,
the local state dropped, the room closed on this device with its own line. It
is not a commit, so it waits on no relay -- there is no state of ours it would
make canonical. An admin's device that receives the proposal commits it on
receipt, as the library expects, so a leaver is out of the tree without anyone
pressing anything; the commit goes through the gate like every other. The
library refuses a SelfRemove from an admin outright -- an admin self-demotes
first -- so an admin's leave is refused here before anything is raised or
dropped, in words a person can act on: hand over admin, or, for the only
admin, disband. Legacy rooms leave the way they always did.
An admin removes a member with stageRemoveMember through the gate; the library's
admin-depletion guard refuses a commit that would leave no admin. An admin
disbands with stageEnableDisbanding and stageDisband -- two commits when the
group predates the lifecycle component, one otherwise -- under the DISBANDING
gate, which is durable so a crash between raising it and publishing does not
lose the request; the second step is taken by continueDisband when the first
is accepted. Both are on the room detail screen, for a device that administers
a current-profile room: a remove action on every member row but its own, and a
disband button beside leave, with an explainer that says nobody rejoins. A
disbanded room says so and hides every write entrance.
The captions are derived, never received. v2 spells them as kind-1210 system
rows and is explicit that a row arriving over the wire is one member's
assertion, not a fact; here they are written by processGroupMembershipChanges
from the difference between the room's members before a commit and after it --
"X joined the group", "X left the group", "The group was disbanded", "You were
removed from the group" -- on every device that applies the commit, including
the one that made it, which is why an admin's own removal no longer writes a
line of its own: every device says the same thing at the same point. A commit
that removed our own leaf, or disbanded the group, closes the room here as well.
A commit this device made is applied at the relay's OK, where the room now
follows the state it gained. MarmotCommitResult.NO_INVITEE marks a commit that
invites nobody, so the OK sends no Welcome for it.
Tests: GroupLifecycleJvmTest, with quartz's own managers standing in for the
other member, covers an admin committing a member's leave on receipt and the
room saying they left; a removal applied on both sides once the commit lands; a
disband ending the group for everyone, closing the room and refusing what
follows; an admin's leave refused with its reason; and a member's leave sending
the proposal the other side stages, dropping the state and closing the room.
The stand-in is now one fixture, MarmotStandIn, shared with the interop test.
Full JVM suite: 1,182 tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"Add schema" opened the editor on the two fields every list has and left the
member to build the rest. curare.to's /new page does it the other way round:
a "Start a list" picker of four shapes -- links & text, discussion, catalogue,
custom -- and an editor seeded from the one chosen. The button now pushes
SelectCuratedSchemaTemplateScreen, that picker on a phone, and a card pushes
the editor with the template's key, the same word the site takes as
?template=. Back from the editor is the picker and another shape; when a new
list's proposal goes out the signing session replaces both.
CuratedSchemaTemplate is lib/protocol/templates.ts field for field, with
CuratedDeriveRule for the [rule:<key>] mark the site records in the
identifier field's hint -- its own convention, not the NIP's, and the thing
that lets that site's form derive an entry's d for a list the group starts
here. The hint is written byte for byte as the site writes it; the app still
composes no suggestions and applies no rule. Null or an unknown key seeds
Custom, which is the bare two fields the editor opened on before, so a
screen handed no template behaves as it did.
The picker's one departure from the site: its cards list a template's
fields by label, the way the group's schema cards do, rather than counting
them -- what an entry asks for is what the choice is made on.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The entries screen had one "Broadcast" under each card, and each opened
`BroadcastGroupSignedEventScreen` for that one entry: a group that has accepted
twenty entries into its lists sent them with twenty trips through the relay
picker. This is the other button. "Broadcast all", an extended FAB in a bottom
bar, sends every entry on the screen, newest first, one after another, and says
under each card what its relays answered. Behind no gate, like the button under
each card: sending what the group has already signed takes no share of the key.
**Each entry goes where its own broadcast screen would have started.** The list
that screen seeds -- `defaultRelaysFor`: the group's General write relays or the
app's publish set, plus the list's own relays, minus what the group has blocked
-- is what a member who reads nothing and presses the button sends to, and this
button is that member with twenty entries. The group's relay lists are read
into the loaded state for it; the list's relays come off the entry, which
carries its schema, so the rule is handed that one schema rather than all of
the group's. Nothing is shown before the press, which is the difference from
the one-event screen and the reason that screen stays: a refusal is answered
there, where the relay can be changed and the send tried again.
**One entry at a time, on purpose.** The rows fill in top to bottom, so the
member can see where the batch is; and a public relay sent twenty events in
one burst answers "rate-limited" to most of them, which would make the button
worse than the presses it saves. Each entry's send has the same ceiling as a
single broadcast and the batch has no other, since a long list is meant to
take a while. It goes to the pool directly rather than through the queue, for
the reason `BroadcastGroupSignedEventViewModel` gives, and it is only as
durable as the press: leaving the screen ends it where it is.
**The send is shared rather than copied.** What a relay's answer becomes -- an
OK, a rejection in the relay's words, a failure, or no answer when the whole
send runs out of time -- was decided inside `broadcast()` on the one-event view
model. It is now `sendToRelays` on that model's companion, beside
`defaultRelaysFor` and `wireEventOf`, and `broadcast()` keeps only the state
around it; the thirteen tests on it pass unchanged. The words for an answer
moved the same way, out of the relay row and into `RelayOutcome.label()`, which
both screens now use.
**What the member is told.** A line above the cards -- "Sending entry 3 of
12…", then "Accepted by every relay for 11 of 12 entries." -- persistent rather
than a snackbar, because it is the answer the member came for and a snackbar
would be gone before the last card had been read. Under each card, "Accepted
by n of m relays." in the one-event screen's words, and one line per relay
that did not say OK, named with its reason, because "blocked: not on the allow
list" is something a member can act on and a count of two out of three is not.
An entry with nowhere to go -- everything the seed would name blocked -- is
marked so rather than sent to nobody. The FAB looks disabled while a batch is
out, and a second press is refused.
`GroupCuratedEntriesViewModelJvmTest` pins where each entry goes, that the next
waits for the last to settle, what the answers become, and the refusals; the
screen test drives the button end to end and checks that each answer sits
between its card and that card's own broadcast. The shared fixture entry now
carries the `a` root a real entry has -- without it the seed rule could not
find the list's relays, which the first run of these tests found.
Verified with :composeApp:m3Audit (all budgets met),
:composeApp:compileDebugKotlinAndroid and :composeApp:jvmTest (1085 tests,
7 new).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Phase 4 of docs/npub-profile-preview.md. Phases 1-3 moved the twenty-second
dead end one screen later: a person found on an indexer, a press, and
InitiatingNewChat waiting for a key package that someone who has never opened
Curare will never have published. The preview now reads the answer before the
press. A room that already exists opens; a key package that is here enables
"Start new chat"; one that is not, once the relays have had their time,
disables it with the reason under it and a try-again that asks the DM relays
alone.
The existing-room check was a loop with a TODO inside initiateNewChat; it is
ChatRepository.findDirectMessageRoom now -- a room whose members are exactly
the two keys, or the one key when they are the same -- read by both screens and
pinned by a test on an in-memory database. The old size-one branch would have
opened any room the peer sat in alone, whoever they were.
Both halves are observed together, as the chat screen does: a key package
arriving after the profile touches a different table, and a collect on the
profile alone would never see it. A room is read once up front, because a key
package is meant to be used once and the relays need not hold a fresh one for
someone you already talk to.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Phase 3 of docs/npub-profile-preview.md, and the user-visible change: "Direct
message via npub" now shows who this is before anything is created. The
dialog's button reads "Find profile" and pushes ProfilePreviewRoute; the chat
is started from there.
The field keeps what it parsed rather than whether it parsed. Its check and its
decode used to be two different functions, which is how "nostr:npub1…" passed
the one and failed the other, closing the dialog with nothing to show for it;
CredentialParser.npubOrNull is the sign-in decode exposed for an address field
-- an nsec is null there, because a field asking whom to write to must never
take a secret for an answer -- and the enabled button and the route it pushes
read the same key. The nip05 branch still lands on the placeholder, and the
test says so. "Start chat" goes with its only reader.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>