Repository navigation
MDK 0.20.0
Promoted from verified MDK commit 8a7121ba542b69e21b13630951881053c3a4aae7 (impact: minor relative to v0.19.0). See the 0.19.0 → 0.20.0 integration guide.
- Storage migrations. Adds/updates 20 SQLite migration file(s); downgrade across schema migrations is unsupported. Roll out matching bindings and binaries to apps and extensions together.
Breaking changes
-
chats_closed_to_linked_devices(MarmotKit and Cmarmot_chats_closed_to_linked_devices) now lists the chats that
can't take any device of this account instead of counting them. Each entry carries the chat'sgroup_id_hex, a
reason(AccountDevicesOff,ChatRelaysorDeviceLimitReached) and the chat's group reason from
account_devices_activationasactivation, so Settings → Devices can group them into chats this account can turn
on, chats waiting on an admin or on member updates, and chats at the device limit. Hosts that showed the count read
the list's length; C hosts free it withmarmot_chat_closed_to_linked_devices_list_free. -
The kind 477 post-link chat inventory carries a required
closedcount. Devices on earlier builds with device
groups turned on drop pages from upgraded approvers, and upgraded devices drop theirs, so link progress shows as
unavailable until both devices update. -
account_devices_activation(MarmotKit and Cmarmot_account_devices_activation) returns a readiness record instead
of the bare reason:activation(the group's reason, the same for every member),own_account(set when this
account's own devices hold activation back:NeedsUpdate,NeedsReplacementorDeviceLimitExceeded) and
blocking_accounts(each account that holds it back with one reason, filled only for an active admin, so the admin
knows whom to ask). Readactivationwhere the bare reason was read; C hosts free the record with
marmot_account_devices_readiness_free. -
disbanding_blockers(inAppGroupMlsState, MarmotKitAppGroupMlsStateFfiandGroupManagementStateFfi, and
their C mirrors) now lists accounts only for an active admin; it is empty for other members. New
has_disbanding_blockersandown_account_blocks_disbandingtell every member whether disbanding waits on member
updates and whether this account's own devices are among them. Hosts that testeddisbanding_blockersfor
emptiness readhas_disbanding_blockers. -
Account SQLite schema migration
0233_drop_gen2_recovery_tablesdrops the retired Gen-2
recovery tables (account_recovery_scopes,account_recovery_obligations,
account_recovery_state,account_recovery_comparison,account_recovery_conversion_counts,
account_recovery_conversion) and removes the Gen-2-to-Gen-3 conversion code path; older
binaries refuse schema 233 and downgrade is not supported. Before dropping the tables,
unconverted pre-0.15 databases preserve live delivery-loss evidence and pending explicit
history repairs into Gen-3 state, while legacy Gen-2 parked/dismissed/known-event/maintenance
obligations (including parked known-event notices) are retired. -
Account SQLite schema migration
0232_epoch_gap_gen3replaces the legacy epoch-gap rows in
account_recovery_obligationsandaccount_recovery_epoch_gap_retrieswith the native Gen-3
account_recovery_epoch_gapstable and drops the dead Gen-1app_epoch_stall_evidenceand
app_group_recovery_failurestables. Older binaries refuse schema 232; downgrade is not supported. -
Added explicit local queue-backpressure variants (
SliceReply::Busy,SecondReply::Busy,IdsReply::Busy,SweepEnd::LocalBusy,CompareEnd::LocalBusy,DirectoryInspectionError::LocalBusy, and internalFiniteEnd::Busy) so local finite-request admission timeouts are never misclassified as relayUnreachable/TimedOutfaults or silent record absence. -
marmot_forensics::v5::EventaddsGroupAddedLeaves(withAddedLeafMember) for the newgroup_added_leavesrow.
The enum is not#[non_exhaustive], so exhaustive matches add an arm. -
Rust callers can inject an
EntropySourcefor engine draws and kind-445 sealing and signing (mdk#3497).
NostrMlsPeeler::newtakes an entropy source and a wall clock. UseDefaultfor system sources.
Pass a clock toNostrTransportEvent::new_unsigned, or usenew_unsigned_atwith an explicit timestamp. -
nostr_directory::SlotPublicationadds acomplete_endpoints: Vec<TransportEndpoint>field recording the relays that returned the winning publication and completed their read; downstream Rust callers that construct or exhaustively destructureSlotPublicationmust include or ignorecomplete_endpoints. -
Added
follows_created_at: u64tonostr_directory::UserDirectoryRecordandstorage_sqlite::PublicDirectoryUserRecord, andcreated_at: u64tonostr_directory::FetchedFollowList, backed by schema migrations0004_follows_created_at(directory cache) and0006_directory_follows_created_at(shared storage). -
fs_private::create_dir_all_privatenow routes Unix path creation throughprepare_directory_path, refusing
user-owned symlinked ancestors and world-writable aliases such as/tmpon macOS (allowing only trusted root-owned
platform aliases and preserving the current directory.without altering its mode) (mdk#3799). -
marmot_account::AccountHomenow rejects Windows-reserved device names (CON,CONIN$,CONOUT$,PRN,AUX,
NUL,COM1–COM9,LPT1–LPT9, and superscript variants), leading/trailing spaces, trailing dots, and
Windows-forbidden filename characters on newly created or imported account labels across all platforms (existing Unix
account records remain readable, updatable, and removable),AccountHome::account_dirnow panics on unsafe
path-traversal labels (usetry_account_dirfor untrusted input), and local-file secret reads (secret.json) now
refuse group/world/executable/special permission bits withPermissionDenied(fix withchmod 600) (mdk#3799). -
Account SQLite schema advances to migration
0230_recovery_hot_path_indexes(adding three partial hot-path indexes onaccount_recovery_units); databases upgraded to schema 230 cannot be opened by older binaries. -
MarmotAppEventError::Jsonnow carries a closedMarmotAppEventJsonErrorcategory instead of raw parser text,
SecretBytesis now a redacted-Debugzeroizing newtype returned byopen_historyandopen_with_recovery_key,
DeviceRosterV1::leaf_tag_keyis wrapped inZeroizing<[u8; 32]>, andGroupBlossomImageV1,
AppGroupImageComponent, andRecoveryWordsimplementDropandZeroizeOnDrop(mdk#3796). -
Removed the retired pre-#2660
NostrSdkRelayClient::reconcile_subscription,NostrTransportAdapter::record_reconciliation, andNostrReconciliation*types fromtransport-nostr-adapter(along with the doc-hiddenreconcile_inbox_history/reconcile_group_historywrappers ontransport-nostr). Account history recovery usessweep::run_sweepandcompare::run_comparisonoverSdkSweepRelay. -
storage-sqlitenow enforcesSqliteStorageOptions::cipher_compatibilityand
SqlCipherHardening::cipher_compatibility(1..=4) afterPRAGMA keywith no silent format fallback, and rejects
unsupported values outside1..=4before keying. Defaultcipher_compatibility = 4databases are unaffected; callers
that previously created a database with a non-default value (such as3) produced a SQLCipher v4 file on disk and
must reopen it withcipher_compatibility = 4(or migrate/rekey it offline). -
OutboundWelcomeStatus::PastDeadlineis a Welcome past its delivery deadline that is not marked expired yet;
Settled(WelcomeSettlement::Expired)now means a Welcome marked expired, at any clock (mdk#3589). -
Engine::own_account_leaves_tagged_byreturns each leaf's signature key with the slot its tag read as. -
Engine::queue_app_message_with_audit_contexttakes the intent'sonly_to_members. -
The engine no longer seals or unseals the account inbox (mdk#3498). Sends and creates return unsealed
OutboundWelcomes; bind the sealed messages withEngine::bind_sealed_welcomes, together with the commit's first
fanout write when it has one.ingeststops atIngestOutcome::InboxSealedfor a Welcome addressed to this
client; pass the unseal result toingest_unsealed. To keep wire provenance across unsealing, use
Engine::begin_ingest_with_audit_contextand pass its continuation toingest_unsealed_with_audit_context.
confirm_group_rejointakes the unsealed offer. Read it withstored_welcome, which takes the confirmation's
local_state_tokenand refuses a stale one before anything is unsealed.
Engine::rejoin_retryyields one eligible stored offer at a time. Unseal each offer and apply its result before
asking for the next one.
Engine::transport_peeleris removed. -
Implement
EntropySource::fill_bytesto supply engine randomness. The system default isOsEntropy.
Direct callers ofIdentity::load_or_generatepass the MLS crypto provider used to generate new signers (mdk#3497). -
open_history,open_with_recovery_key, and the correspondingEnginemethods now return redacted-Debug
zeroizingSecretBytesinstead ofVec<u8>(mdk#3796). -
LocalSendStatusgainsRefusedNewMembers, andQueuedandEngineOwnedcarry the send'smessage_id_hex, so a
host that lost the acceptance learns the event by asking rather than by handing the send again. -
Kinds 1201 and 1202 take the shape of marmot-agents D-076, and the old shape is gone (D-051): an agent item
(kind 1201) and an answer or a control (kind 1202) are sent withsubmit_custom_eventorsend_custom_event, which
check their shape and refuse one overAGENT_EVENT_MAX_BYTES(64 KiB). MDK names a turn's starting message with a
started_bytag, note.send_agent_activity,send_agent_operation_event,AgentOperationEventRequestand the
AppMessageIntent::AgentActivityandAgentOperationvariants are removed, and kinds 1201 and 1202 are no longer
reserved app event kinds. -
NotificationTrafficClass::AgentActivityis removed. An agent item notifies on the standard class only while its
latest version is a waiting approval or question, or a failed turn; other items, every kind 1202 and a chat message
tagged["phase", "commentary"]do not notify. Each alerting version is delivered once, live or after the subscription
catches up, under the key of the item's first event, so the host replaces the earlier notification; a reaction to an unreadable item previews nothing. -
A message's
NotificationUpdate::notification_keynames its chat (message:<account>:<group>:<message id>). Event
ids carry no chat, so one chat's alert no longer replaces another's for the same id. -
Whether a send wakes the group's members is read from the sent event, so a send resumed after a restart wakes them
exactly as the first attempt would: a chat message tagged["phase", "commentary"], also as a reply, wakes nobody,
and an agent item or a new version of one wakes members only while it needs a person or its turn failed. -
TimelineUpdateTrigger::AgentActivitybecomesAgentItem, andAgentOperationis removed: a kind 1202 has no
timeline row. -
TimelineMessageRecord::canonical_order_keygains the agent itemseqbefore the message id. -
AppErrorgainsIncompatibleKeyPackage(Box<EngineError>). When a complete lookup finds only KeyPackages incompatible
with a new direct chat's founding requirements, the start returns this variant in place ofAppError::Session.
Handle it in exhaustive matches.as_engine_errorstill exposes the cause (#3604). -
RecoveryWordsandAppGroupImageComponentnow implementDropandZeroizeOnDropto erase secret buffers on
drop; callers taking ownership of fields should borrow or usestd::mem::take(mdk#3796). -
MarmotLocalSendStatus::stategains4: refused because the group gained a member account the send leaves out.
The struct gains a nullablemessage_id_hexaftersummary, the send's event while MDK holds it (states 0 and 1).
Rebuild clients with the matching header and library. -
MarmotTimelineMessageRecordgains a nullableagent_item: MarmotAgentItem *aftergroup_system, and
agent_item_first_event_missing: boolafter it: true for an agent item whose first event this device does not
hold, such as one that began before the member joined.
MarmotTimelineUpdateTrigger'sAgentActivitybecomesAgentItemandAgentOperationis removed, which
renumbers the later variants;MarmotNotificationTrafficClasslosesAgentActivity. Rebuild clients with the
matching header and library. -
Add the public avatar acquisition option to
MarmotClientOptions, changing its layout. Recompile C consumers with the matching header and library. -
Add pinned retention fields to
MarmotTimelineReplyPreview. Rebuild consumers with the matching header and library. -
LocalSendStatusFfigainsRefusedNewMembers, for a send limited to member accounts that the group gained a member
it leaves out.QueuedandEngineOwnedcarry the send'smessage_id_hex. -
Swift: cancelling a
Taskthat awaits a throwing async call, a command or a receive, now cancels its native future
and throwsCancellationError(mdk#3670). Before, the call ran to completion and returned its result. A call that
completed first still returns its result, and calls whose work must finish, such asshutdownAndClose(),
removeAccount(),signOut(),signOutAndWipe()and thelogin*calls, still wait. The four projectionnextCancellable()adapters now report a native error that
completed before the cancel instead ofCancellationError. -
TimelineUpdateTriggerFfi::AgentActivitybecomesAgentItemandAgentOperationis removed;
NotificationTrafficClassFfi::AgentActivityis removed. An agent item notifies asStandardonly while it is a
waiting approval or question, or a failed turn. -
MarmotKitErrorgainsIncompatibleKeyPackage. Update exhaustive Swiftswitchand Kotlinwhenexpressions to
handle it, and regenerate bindings with the matching native library. For this error, ask the recipient to update
their client and publish a compatible KeyPackage (#3604). -
Schema migration
0233_drop_gen2_recovery_tablesdrops the retired Gen-2 recovery tables
(account_recovery_scopes,account_recovery_obligations,account_recovery_state,
account_recovery_comparison,account_recovery_conversion_counts,
account_recovery_conversion) and performs a one-shot cleanup of pre-PR-#3877 leaked
group-route and orphaned-group recovery rows. Before dropping the tables, unconverted
pre-0.15 databases preserve live delivery-loss evidence and pending explicit history repairs
into Gen-3 state, while legacy Gen-2 parked/dismissed/known-event/maintenance obligations
(including parked known-event notices) are retired. Older binaries refuse schema 233;
downgrade is not supported. -
Removed the Gen-2 recovery-obligation storage and conversion APIs (
convert_recovery_obligations,
recovery_conversion_pending,RecoveryConversionInput,RecoveryConversionReport,
RecoveryConversionRoute,RecoveryConvertedObligations, and legacy Gen-2 obligation/scope
CRUD methods), replacing conversion with directimport_recovery_loss_to_ledger
(RecoveryLossImportInput,RecoveryLossImportRoute). -
Schema migration 0227 gates the stored-message payload tag 16, which carries an owed outbound Welcome's expiry mark
(mdk#3589). The migration changes no table; older binaries refuse schema 227, because they cannot decode that tag
and would read a Welcome marked expired as withdrawn. Downgrade is not supported. -
SqliteAppStorage::recovery_coverage_newest_releasedtakes the routes to read and returns each one's newest
released second, from one look at the ledger. Callers that passed asincekeep only a second at or after it. -
Account migration 0226 rebuilds
local_message_submissionsto admit state 4, a token send refused because the group
gained a member account its member list leaves out, and indexes refused sends. It fences older binaries, which
would send a retained member-limited send without its list. Older binaries refuse schema 226; downgrade is
unsupported.SqliteAppStorage::refuse_local_submission,invalidate_refused_local_sends_for_groupand
groups_with_refused_live_local_sendsare new, and retiring a queued application message refused for a new member
settles its local send in the same transaction. -
Migration 0219 adds
message_timeline.timeline_order_seq, rebuilds the canonical order index with it before the
message id, and drops kind-1202 timeline rows.TimelineMessageRecordgainsagent_itemand
timeline_order_seq, andTimelineUpdateTrigger::AgentActivity/AgentOperationbecomeAgentItem. -
Account migration 0225 adds
cgka_welcome_delivery_ledger, one record per outbound Welcome's delivery
(mdk#1706). Older binaries refuse schema 225; downgrade is unsupported. -
Migration 0221 adds
agent_item_expired_targets: the retention sweep records each agent item whose row it removed,
so an edit of it that arrives later does not show it again. A sweep from before the migration is not recorded, so
on a nightly build's database a late edit of an item removed then can still show it. -
Account migration 0223 adds the invitation standing (
pending_confirmation,welcomer_account_id_hex,
via_welcome_message_id_hex) tolocal_group_deletion_frontiers. Older binaries refuse schema 223; downgrade is
unsupported. -
Schema migration
0232_epoch_gap_gen3introducesaccount_recovery_epoch_gaps, migrates
account_recovery_obligationsrows withcause = 1joined withaccount_recovery_epoch_gap_retries,
deletescause = 1rows fromaccount_recovery_obligations, and drops
account_recovery_epoch_gap_retries,app_epoch_stall_evidence, and
app_group_recovery_failures. Older binaries refuse schema 232; downgrade is not supported. -
Removed the dead Gen-1 recovery-health storage APIs (
StoredEpochStallEvidence,
record_epoch_stall_evidence,epoch_stall_evidence,clear_recovery_failure,
automatic_recovery_failed). -
StorageOpenProgressis now#[non_exhaustive]and addsStorageOpenProgress::MigrationBatchFinished, which
reports the number of ledger entries committed by the fresh-account baseline. Exhaustive matches outside
storage-sqliteneed a wildcard arm (and may handleMigrationBatchFinished). -
Schema migration 0229 gates the stored-message payload tag 17, which carries a Welcome the engine staged before the
session sealed it (mdk#3498). The migration changes no table; older binaries refuse schema 229, because they cannot
decode that tag. Downgrade is not supported. -
MoveRejectedSlotdropstag_signature_key: a move's carriedremovedrecords go into the destination with no
key (marmot#520). Facts captured before keep reading; the stored key is ignored. -
Account SQLite schema advances to migration
0230_recovery_hot_path_indexes(adding partial indexesaccount_recovery_units_pending_probes,account_recovery_units_broken, andaccount_recovery_units_saturatedonaccount_recovery_units); databases upgraded to schema 230 cannot be opened by older binaries. -
SqliteStorageOptions::cipher_compatibilityandSqlCipherHardening::cipher_compatibility(1..=4) are now
enforced afterPRAGMA keywith no silent format fallback, and unsupported values outside1..=4are rejected before
keying. Defaultcipher_compatibility = 4databases are unaffected; callers that previously created a database with a
non-default value (such as3) produced a SQLCipher v4 file on disk and must reopen it with
cipher_compatibility = 4(or migrate/rekey it offline). -
SqliteAppStorage::record_recovery_relay_reconnectedno longer clears durable relayunreachable_streak,cooldown_step, or active cooldowns on bare reconnect notifications, and now returns the ongoing outage spell's start timestamp (cooldown_since_seconds) instead of an ended spell. Callers that previously relied on bare reconnects clearing cooldowns must migrate to granting at most one bounded reconnect probe per returned outage spell and letting a real relay answer (settle_recovery_unit/relay_answered_tx) clear durable cooldown state and schedule long-cooldown re-checks. -
StoredMessagePayload::OutboundWelcomegainsexpiry: Option<message::WelcomeExpiry>, the durable expiry mark
of an owed outbound Welcome (mdk#3589), stored as payload variant 16; a Welcome without one keeps its bytes, and a
staged Welcome never carries one.welcome_expiryandwith_welcome_expiryread and set it. -
OpenMlsContentFilter::NoOpenMlsMessagelets a listing read only rows whose payload carries no OpenMLS message,
such as retained outbound Welcomes. -
RosterTagKeyStoragegainsrenew_roster_tag_keys, which moves the sighting time of a slot's unexpired keys in one
step and keeps their order (mdk#3679). -
SendIntent::AppMessagegainsonly_to_members: the member accounts the payload may reach. The engine checks the
group's member accounts when it encrypts, so a send queued while an Add merged is refused
(EngineError::AppMessageNewMembers, new) rather than sent to the new member.Nonekeeps today's behavior. -
OutboundIntentStorage::retire_refused_queued_outbound_intent(defaulting to a delete) retires a queued intent the
settled state refused, given the refusal's kind, so a host's storage can settle its own state in the same
transaction. -
MARMOT_APP_EVENT_KIND_AGENT_ACTIVITYandMARMOT_APP_EVENT_KIND_AGENT_OPERATIONbecome
MARMOT_APP_EVENT_KIND_AGENT_ITEMandMARMOT_APP_EVENT_KIND_AGENT_REQUEST, and the old shape's tag constants
(AGENT_ACTIVITY_STATUS_TAG,AGENT_OPERATION_*_TAG) are removed. -
The account inbox leaves
TransportPeelerfor the new asyncInboxSealer(mdk#3498):peel_welcome,
wrap_welcome,wrap_welcome_with_metadataandwrap_group_recoveryare gone, and the remaining group-message
methods are synchronous.SendResult's andAutoPublish'swelcomesare unsealedOutboundWelcomes; a caller
seals each and returns it as aSealedWelcome.CgkaEngine::ingestanswersIngestOutcome::InboxSealedfor a
Welcome addressed to this client, finished by the newingest_unsealed;join_welcometakes the unsealed
content.StoredMessagePayload::UnsealedWelcome(tag 17) holds a Welcome until it is bound or, for a founding
Welcome, its delivery deadline passes.
WelcomeSizeCheck::oversized_welcometakesOutboundWelcomes, andTransportAdapter::size_class_over_event_len
judges an event by its length. -
Implement
EntropySource::fill_bytesto supply entropy (mdk#3497). The defaultnext_u64reads eight
little-endian bytes from that source. -
RosterTagKeyStoragegainshold_roster_tag_keys_as_removed, which marks a slot's unexpired keys as held as
removed, unless one already is, without moving their sighting times or order: the engine calls it for aremoved
record that keeps no key (marmot#520).SendIntent::RecordRemovedSlotnow carries a record with notag_signature_key. -
MarmotAppEventError::Jsonnow carries a closedMarmotAppEventJsonErrorcategory instead of a rawString,
SecretBytesis now a zeroizing newtype with redactedDebugoutput,DeviceRosterV1::leaf_tag_keyis
Zeroizing<[u8; 32]>with redactedDebugoutput, andGroupBlossomImageV1implementsDropand
ZeroizeOnDropto erase key material on drop (mdk#3796).
Added
- Link progress (
LinkChatProgress, MarmotKitLinkChatProgressFfi, CMarmotLinkChatProgress) carriesclosed:
how many of the approver's chats take no device of this account and are left out oftotal, on both the approver
and the new device, so the new device can show "2 chats synced · 14 not ready yet". A closed chat that already
holds the new device is not counted. - Hosts can tell a user that their published inbox list keeps invitations sent through it from reaching them:
account_relay_healthlists each relay of the account's inbox and NIP-65 lists with its roles and whether the relay
policy allows it, and raises aCriticalwarning for a published inbox list that is empty or allows no relay
(including the fallback to the default relays, which raised nothing before), aWarningfor refused entries beside
allowed ones and aNoticefor a single allowed inbox relay, in MarmotKit and C.RelayHealthChangedreports changes
that come from the relay lists only, never a relay connecting or disconnecting; connection changes come from the
existingsubscribe_relay_liveness. It reads only held data and never dials; an inbox list MDK does not hold yet
raises no warning. - Bounded TLA+ safety and liveness model for Gen-3 inbound history recovery
(formal/liveness/InboundRecovery.tlaandformal/liveness/verify_inbound_recovery.py, wired
intojust tla-liveness), verifying coverage certification, bounded epoch-gap visits, unit
failure caps, crash/restart resumption, and progressive uncover/parking liveness with 8
sensitivity mutants and 4 reachability witnesses. - C and MarmotKit can durably submit tagged text, inline replies, NIP-22 thread messages with attachments, and pack
stickers. Retrying the same accepted request with its original client token after restart returns the original ID. - Hosts can read whether each invite reached the invited account's inbox relays:
invite_deliveriesreturns one
durable answer per group and invited account (Waiting,Sendingwith the latest problem,RelayAccepted,
UndeliverableorCancelled, with device and relay counts), andInviteDeliveryChangedreports each change, in
MarmotKit and C (mdk#1706).RelayAcceptedmeans a relay stored the Welcome, not that the recipient received it.
Only invites sent after the upgrade are listed; an older Welcome stays inpending_welcome_deliveries. - Added
FiniteRequests::shutdownintransport-nostr-adapterto reject new finite requests, retire active slots (suppressing unsent REQs and sendingCLOSEfor already-sent active requests on live clients), end active/waiting requests asDisconnected, and join trackedsend_msg(req)andCLOSEcleanup tasks (also invoked byNostrSdkRelayClient::shutdown). - A v5 audit row,
group_added_leaves, follows eachgroup_baseline: the group's accounts that hold a leaf no commit
or Update has replaced since its Add, each with the earliest lifetime end of the KeyPackages those leaves were built
from, in Unix seconds, and an empty list when there are none. A joiner that judges those lifetimes refuses every
Welcome into the group once one has passed, so the row names the dormant member holding invites back. The White
Noise audit receiver must accept the new kind before a build that writes it ships. - Hosts can tell a user that an inbox relay refused to serve their invitations:
check_account_relaysasks each of the
account's inbox relays once for its gift wraps, on a connection of its own, and marks a relayHealthywhen it
answers,Failingwhen it gives an explicit policy refusal to the account's own key (authentication refused as
restricted, blocked or payment-required; payment required; restricted or blocked), andSuspectedwhen the check
could not verify it. AWarningnames a failing inbox relay beside a usable one, and the existingCriticalalso
fires once every inbox entry is refused or failing. The account worker runs the check, once at each start for an
account whose own key signs and on request; results belong to the running account and are never stored. A check no
relay answered changes nothing. A request while a check runs is refused at once with the newRelayCheckRunning
error (MarmotKit) orMARMOT_STATUS_RELAY_CHECK_RUNNING(C). In MarmotKit and C. - Added
fs_private::open_existing_regular_nofollowto open existing regular files without following symlinks or
blocking on FIFOs,media_store::format::checked_file_bytesfor overflow-checked encrypted file-length calculation,
andmarmot_account::AccountHome::try_account_dirfor fallible account-directory resolution (mdk#3799, mdk#2554). - Added read-only, range-bounded
SqliteAppStorage::transport_reconciliation_inventory_sinceandSqliteAppStorage::transport_reconciliation_inventory_in_rangequeries for NIP-77 comparison and re-check planning. - Withdraw your vote from an open single-choice or multiple-choice poll. A withdrawal removes your selection from the tally and voter list, and you can vote again before the poll closes. Older clients do not display withdrawals.
- Added
NostrSdkRelayClient::from_builder_with_account_signerintransport-nostr-adapterso authenticated publish and receive SDK clients share one factory path. Engine::expire_sent_welcomemarks an outbound Welcome past its delivery deadline expired in one row write: the row
becomesFailedwith aWelcomeExpirymark, so it readsSettled(Expired)whatever the clock, is never published
or marked delivered, and is not re-owed when its commit confirms (mdk#3589).record_sent_welcome_expirynotes that
its expiry was recorded, andunrecorded_welcome_expirieslists those a stop left unrecorded, reading only rows
that carry no OpenMLS message and naming each group it could not read (unrecorded_welcome_expiries_inreads one
again).Engine::own_account_self_signed_tagsreads, for this account's other leaves, a device tag that verifies under
that leaf's own signature key, with the slot it names (mdk#3679).- An application message sent with
only_to_membersis encrypted only into an epoch whose member accounts it all
lists, checked at encryption for direct sends and queued ones alike; otherwise it fails with
AppMessageNewMembers, or, queued, is retired throughretire_refused_queued_outbound_intentand announced as
QueuedIntentRefused. Engine::deferred_stall_evidence_sincereturns deferred stall evidence for rows whose arrival epoch falls in
min_epoch..=group.epoch, for active epoch-gap handoffs across partial advances.Engine::stored_outbound_welcome_status, an outbound Welcome's status read from its stored rows without the
live-group gate, for the sender's invite delivery view (mdk#1706).Engine::unsealed_owed_welcomeslists founding Welcomes a create left unsealed, for maintenance to seal (mdk#3498).Engine::member_add_leaf_not_afterslists each account in a group's current tree that still holds a leaf its Add
built from a KeyPackage, with the earliest such KeyPackage'sLifetime.not_after: devices that have not committed or
sent an Update since they were added. Advisory.Engine::has_retryable_rejoin_offersreports whether any stored rejoin offer is actionable by automatic maintenance (rejoin_retry) without explicit user confirmation, excluding manual offers on healthy live groups.- Add NIP-46 remote-signing support to
wnandwnd:wn login --bunker-stdin/wn accounts nip46 login --bunker-stdinreadbunker://URIs from stdin (rejecting NIP-46 URIs on argv), review and confirm permissions (interactively or via--approve-permissions), connect, and log in viaMarmotAppRuntime::nip46_loginwith optional--default-relaysand--bootstrap-relays(publishing missing relay lists to the default relays).wn login --nostrconnect/wn accounts nip46 login --nostrconnectsupport client-initiatednostrconnect://pairing (printing the pairing offer URI before awaitingconnectand login, both locally and streamed throughwnd).wn accounts nip46 register,status, andremovemanage existing NIP-46 external-signing sessions.wn accounts list,wn accounts status, andwn whoamireportexternal_signingandsigning_mode(local,external, orpublic).wndstartup restores persisted NIP-46 accounts independently viaMarmotAppRuntime::start()without blocking local accounts, and one-shotwncommands resume sessions on demand vianip46_resume.- All signing-capable
wnandwndoperations (messages,groups,chats,keys,profile,relays,sync,follows,media,devices, and streaming subscriptions) now acceptexternal_signingaccounts while keepingexport-nsecdisabled.
MarmotAppRuntime::account_relay_healthandMarmotAppEvent::RelayHealthChanged: the account's relay rows (roles,
RelayHealthState, policy fault, liveness) and its inbox warnings, from held relay lists and the dial policy only.
Only theUncheckedandNotAllowedstates are produced yet.submit_custom_event_to_membersandsubmit_tagged_edit_for_local_send_to_memberssend only to the listed member
accounts: if the group has another member account when MDK encrypts the send, including one that joined while the
send was queued, it is not sent, its local row is retracted, andlocal_send_statusreportsRefusedNewMembers.submit_thread_messageandsubmit_tagged_stickeraccept a client token and return before relay publication.MarmotAppRuntime::invite_deliveriesandMarmotAppEvent::InviteDeliveryChanged(mdk#1706): oneInviteDelivery
per group and invited account, rolled up from the session's per-Welcome delivery records.RelayAcceptedmeans a
relay stored the Welcome, not that the recipient received it or joined.- A later version of an agent item is a kind-1009 edit carrying the whole item with a higher
v, sent crash-safely
withsubmit_tagged_edit_for_local_sendon the item's token. The row keeps the highest version, ignores an older
one that arrives late, applies an edit that arrived before its item, and is not marked edited. TimelineMessageRecord::agent_itemholds the parsed latest version of an agent item, andtimeline_order_seqthe
first event'sseq, which orders a turn's rows within one second.AgentItem,AgentItemState,AgentRequest
and the agent kind constants are re-exported.- Agent items join threads for subagents (marmot-agents D-121): a kind 1201 may carry NIP-22's
E/K/P(root)
ande/k/p(parent), andsubmit_custom_eventandsend_custom_eventtake itseonly beside anE. An edit
of an item still carries noebut its target's. A thread message answering an item in a thread names that item's
root and the item as its parent. - An agent item whose first event this device never gets, such as one sent before the member joined, is shown from
its edits in its place in the timeline and its thread (marmot-agents D-124), with
TimelineMessageRecord::agent_item_first_event_missingset, and an alerting edit of it alerts. - The agent's own words in a thread under one of its items, a kind 1111 with an
EwhoseKis 1201 and whoseP
is its author, neither notify nor wake members (D-122), and never count as unread or raise the @-badge. Items in a
thread keep their own alert rule. MarmotAppRuntime::check_account_relays, the account worker's inbox check behind theHealthy,Suspectedand
Failingrelay states.RelayHealthRowgainschecked_at_unixandchecking,RelayHealthFaultgains the
check's faults, andRelayWarningKindgainsInboxRelayFailing.AppError::RelayCheckRunning: a check requested while one of the account runs.- Add
OnboardingOptions::create_missing_inbox_listandOnboardingOptions::pass_device_notice_when_none_found(both defaultfalse) plusOnboardingSnapshot::created_inbox_list(OnboardingCreatedInboxList) for existing-key onboarding (#3720, #3729). - Onboarding reports
OnboardingIssue::RateLimitedwhen a relay answers a lookup or publication with arate-limited:refusal (#3721, #3723). - Let hosts disable background acquisition of public avatar URLs.
WelcomeDeliveryProblem::InboxLookupFailed: no usable inbox relay is known for the recipient and the latest lookup
of their inbox relay list failed.invite_deliveriesreports it aslast_problem, and asUndeliverable's cause
when it was the last attempt's problem.marmot_account_relay_healthandmarmot_account_relay_health_free, theMarmotAccountRelayHealthrecord with
its rows, warnings and enums, and theMARMOT_EVENT_RELAY_HEALTH_CHANGEDevent variant, appended after the existing
variants.MarmotEventgains a variant: rebuild against the matching header and library.MarmotAgentItemandMarmotAgentItemState: the latest version of a kind-1201 agent item on its timeline row.marmot_invite_deliveriesandmarmot_invite_delivery_list_free, theMarmotInviteDeliveryrecords with a
flattenedMarmotInviteDeliveryState, and theMARMOT_EVENT_INVITE_DELIVERY_CHANGEDevent variant (mdk#1706).
MarmotEventgains a variant: rebuild against the matching header and library.marmot_send_custom_event_with_client_token: durable token admission of a custom application event, such as an
answer or a control for an agent (kind 1202).marmot_submit_tagged_text,marmot_submit_tagged_reply,marmot_submit_thread_message, and
marmot_submit_tagged_stickerreturn durable local acceptance before relay publication.MARMOT_STATUS_INCOMPATIBLE_KEY_PACKAGEidentifies incompatible recipient chat keys that previously returned the generic runtime status.marmot_check_account_relays.MarmotRelayHealthRowgainshas_checked_at_unix,checked_at_unixandchecking
at its end;MarmotRelayHealthFaultandMarmotRelayWarningKindgain values appended after the existing ones.
Rebuild against the matching header and library.MARMOT_STATUS_RELAY_CHECK_RUNNING(135), appended toMarmotStatus, for a check requested while one of the account
runs.- Add
marmot_begin_onboarding_with_optionswith bitmask flagsMARMOT_ONBOARDING_CREATE_MISSING_INBOX_LIST(1) andMARMOT_ONBOARDING_PASS_DEVICE_NOTICE_WHEN_NONE_FOUND(2), plusMarmotOnboardingCreatedInboxList(created_inbox_list) onMarmotOnboardingSnapshot(released bymarmot_onboarding_snapshot_free) (#3720, #3729). MarmotOnboardingIssueappendsMARMOT_ONBOARDING_ISSUE_RATE_LIMITED(22) for relayrate-limited:refusals during onboarding lookups and publication (#3721, #3723).MARMOT_INVITE_DELIVERY_PROBLEM_INBOX_LOOKUP_FAILED(mdk#2261), appended after the existing values: no usable inbox
relay is known for the recipient and MDK's latest lookup of their inbox relay list failed. Requires the matching
header and library.Marmot::account_relay_health(account_ref)and theRelayHealthChangedevent, withAccountRelayHealthFfi,
RelayHealthRowFfi,AccountRelayWarningFfi,RelayListPresenceFfi,RelayRoleFfi,RelayHealthStateFfi,
RelayHealthFaultFfi,RelayWarningKindFfi,RelayWarningSeverityFfiandRelayRepairActionFfi. Only the
UncheckedandNotAllowedstates are produced yet; later versions add kinds, faults, actions and roles.- Swift
nextCancellable()/nextUpdateCancellable()adapters for the receives generated withoutthrows:
backup restore, chat list, chats, events, group state, messages, notifications, onboarding, timeline messages and
user search subscriptions (mdk#3670). TimelineMessageRecordFfi::agent_item_first_event_missing: true for an agent item whose first event this device
does not hold, such as one that began before the member joined; the row is built from its edits.TimelineMessageRecordFfi::agent_item(AgentItemFfi,AgentItemStateFfi): the latest version of a kind-1201
agent item, with its type, fields JSON,settlesand whether it alerts. A kind-1201 row without one is an
unreadable item, such as the old shape.Marmot::invite_deliveries(account_ref, group_id_hex)and theInviteDeliveryChangedevent (mdk#1706), with
InviteDeliveryFfi,InviteDeviceDeliveryFfi,InviteRelayCountsFfi,InviteDeliveryStateFfi,
InviteDeliveryProblemFfiandInviteCancelReasonFfi.Undeliverable,TooLargeandKeyPackageRetiredare
not produced for ordinary invites yet. Only invites sent after the upgrade are listed; an older Welcome stays in
pending_welcome_deliveriesandWelcomeDeliveryPending, which are unchanged.send_custom_event_with_client_token: durable token admission of an app-defined event, such as an answer or a
control for an agent (kind 1202), so a retry after a restart does not send it twice.submit_tagged_text,submit_tagged_reply,submit_thread_message, andsubmit_tagged_stickerreturn durable
local acceptance before relay publication.Marmot::check_account_relays(account_ref).RelayHealthRowFfigainschecked_at_unixandchecking;
RelayHealthFaultFfigainsAuthenticationRequired,PaymentRequired,Restricted,Unreachable,TimedOutand
Unexplained;RelayWarningKindFfigainsInboxRelayFailing.Healthy,SuspectedandFailingare now
produced. Rebuild against the matching library.MarmotKitError::RelayCheckRunning: a check requested while one of the account runs.- Add
OnboardingOptionsFfi.create_missing_inbox_listandOnboardingOptionsFfi.pass_device_notice_when_none_found(both defaultfalse) plusOnboardingSnapshotFfi.created_inbox_list(OnboardingCreatedInboxListFfi) for existing-key onboarding (#3720, #3729). OnboardingIssueFfiappendsRateLimitedfor relayrate-limited:refusals during onboarding lookups and publication (#3721, #3723).- Let hosts disable background acquisition of public avatar URLs.
- Expose pinned message retention in reply previews.
InviteDeliveryProblemFfi::InboxLookupFailed(mdk#2261): no usable inbox relay is known for the recipient and MDK's
latest lookup of their inbox relay list failed; MDK looks it up again at its next retry. A host that matches the enum
exhaustively must handle it.SqliteAppStorage::recovery_recheck_owed_seconds, which reads covered and retired re-check seconds for a batch of
(route, relay, since, until)units under one connection lock instead of per-unit queries.SqliteAppStorage::with_transactionso multi-step app storage writes commit or roll back
atomically on the shared account connection.recovery_unit_debtsreads many units' debts, each with its unit state, andstaged_recovery_first_seconds
reads the oldest staged second in many ranges, each under one connection lock.renew_roster_tag_keysupdateslast_seen_atfor a slot's unexpired roster tag keys in one statement and leaves
seen_seqalone (mdk#3679).- Kind-1009 edits apply to kind-1201 agent items: the highest
vreplaces the row's content and tags, an older
version is ignored, and the row is not marked edited. Agent items have no edit history. - A kind-1201 agent item with an
Etag is placed in that thread, under the parent itsenames or else the root,
andreply_to_message_id_hexis that parent unless the item names astarted_by. An edit keeps the thread tags
of the item's first event, whatever thread tags it carries. - An agent item whose first event this device does not hold, such as one sent before the member joined, gets a row
from its edits: the earliest readable edit stands in for the first event, at its place, and the highest version
shows.TimelineMessageRecord::agent_item_first_event_missingsays so. The first event, if it arrives, takes the
row back to its own place. If the id turns out to name an event that is no item, such as another edit, the row
goes, and the replies quoting it lose the quote in the same change, asReplyPreviewChanged. A nightly build from
before this change stored such edits without a row: the item shows once another event of it arrives or the chat's
timeline is rebuilt. - A history import reports the rows it removed, such as an item whose only edit it deleted, as
Removechanges, so
an open timeline drops them. - An agent's own words in a thread under one of its agent items (a kind 1111 with
E,K1201 andPits sender)
never count as unread, in the projection, its rebuild and the retention sweep. delete_local_group_datakeeps the deleted row's invitation standing on the group's deletion frontier, and
SqliteAppStorage::local_group_deletion_invitationreturns it asLocalGroupDeletionInvitation(mdk#3555). A
frontier written before schema 223, or by a delete that found no row, returnsNone.- Account migration 0224 adds
evidence_floor_epochtoaccount_recovery_obligationsand
SqliteAppStorage::active_epoch_gap_evidence_floorso active epoch-gap handoffs keep their original arrival-epoch
floor across multi-step partial advances and restarts while parked gaps retire cleanly (and explicit unparks reset
the floor tostalled_epoch). Older binaries refuse schema 224; downgrade is unsupported. - Native Gen-3 epoch-gap storage types and scoped visit APIs (
RecoveryEpochGap,
RecoveryEpochGapScope,recovery_epoch_gaps,recovery_epoch_gap,
begin_recovery_epoch_gap_retry_scoped) that uncover only the caller-specified required relays
from a bounded floor without touching best-effort relays. hold_roster_tag_keys_as_removedsetsheld_as_removedon a slot's unexpired roster tag keys unless one already
has it, and leaveslast_seen_atandseen_seqalone (marmot#520).- Added read-only, range-bounded
SqliteAppStorage::transport_reconciliation_inventory_sinceandSqliteAppStorage::transport_reconciliation_inventory_in_range. - Expose pinned message retention in reply previews.
agent_events: the tags of kinds 1201 and 1202 (marmot-agents D-076),AGENT_EVENT_MAX_BYTES, and the parsers
AgentItem::from_tagsandAgentRequest::from_tagswith the alert ruleAgentItem::alerts.
An item'svandseqare at mosti64::MAX.maintenance::WelcomeDeliveryRecordand itsWelcomeDeliveryState,WelcomeDeliveryProblem,
WelcomeCancelReasonandWelcomeRelayCounts(mdk#1706): the sender's durable record of one outbound Welcome's
delivery.- An agent item in a subagent's thread carries NIP-22's tags (marmot-agents D-121):
validate_agent_item_tagstakes
oneebeside anE, andvalidate_agent_item_edit_tagschecks the item an edit carries, which has noe.
agent_item_thread_parent,agent_item_reply_targetandis_agent_own_thread_comment(D-122) read them. OsEntropyandSystemWallClockare available fromcgka_traitsfor production random bytes and timestamps.WelcomeDeliveryProblem::InboxLookupFailed(mdk#2261): no usable inbox relay was known for the recipient and the
latest lookup of their inbox relay list failed.
Changed
account_devices_activationgives every member, admin or not, the group-wide reason account-devices can't be
turned on yet, so hosts can show a readiness screen to everyone while a group waits.NotAdminnow means every
device is ready and the group waits only on an admin. No answer says which of an account's devices hold activation
back, or how many. A non-admin'senable_account_devicesin a group that something else holds back now fails with
AccountDevicesActivationRefusedand that reason instead ofNotGroupAdmin.- Linking a device now records the new device's signature key in its device-group roster entry in the Commit that adds
it, instead of leaving the new device to write it later (marmot#521, mdk#3679). A key in an entry no longer means the
link is made: a link counts as made once the new device's own first Commit in the device group lands. Until then the
new device tags nothing outside the device group, and its first Commit there is a roster update writing its history
key, or a self-update when the entry needs no change. A device refuses a device-group Welcome whose roster binds its
entry to another key or another slot; a keyless entry from an approver that has not updated still joins. Removal,
inactivity, sign-out, sibling chat gaps and the private KeyPackage hand-off read "made" the same way, and same-account
sibling Adds are refused with the newSiblingAddRefusal::LinkPendinguntil the sibling's link is made. Receivers
do not enforce the new roster rules yet. - App performance counters and timings, including maintenance spans, now require the
app-performance-telemetrybuild feature. Without it, Rust, UniFFI, and C snapshots keep their shape but return zero counters, empty histograms, and no runtime series. OTLP builds without the feature still export relay metrics; product analytics is unchanged. - An admin's device now turns on account-devices (
marmot.group.account-devices.v1) by itself in each group that can
take it, once every member device advertises it, after a random delay of up to 15 minutes, while device groups are on
(MarmotAppConfig::with_device_groups, on by default). Admins no longer have to tap "turn on" for each group;
enable_account_devices(MarmotKit and Cmarmot_enable_account_devices) still turns it on at once. It follows the
spec change in marmot#528. - Every device-group Commit is now held to the roster's key-binding rules (marmot#521, mdk#3679), whoever sends it:
each added device gets a new entry, in that Commit, with its leaf's signature key; an entry's key never changes;
a device's entry is removed only together with its leaf; aremovedrecord keeps only the key its entry had; and no
leaf changes its signature key. A Commit or proposal that breaks one is refused. Only new Commits are checked, so
existing device groups keep working. One known interim gap: a late Commit that makes a device replay its last few
device-group Commits re-checks them, so a link made before upgrading, by an Add that set no key, can lose to a rival
branch while it is still among the last five Commits; that device then relinks. A device-group Welcome must record the joining device's key in its entry, and
a device never writes its own key after its Add. - Removing a linked device finds its device-group leaf by the key its entry carries and removes it with the entry.
Removing the device that founded the device group now takes its leaf too, though OpenMLS built that leaf from a
KeyPackage: the engine counts a founder's link as made.
The fallback that also searched for a leaf tagged with a self-signed device tag is gone, from both removal and the
cleanup of chat leaves (Engine::own_account_self_signed_tagsis removed). - Updated
DirectoryRelayPlaneintransport-nostrto track coalesced directory fetches with waiter-counted cancellation and boundedMarmotRelayPlane::shutdown()cleanup, and removed the unused idleClientfromNostrSdkDirectoryRelayFetcher::standalone(). - Consolidated
RecoveryRunnerbackoff tables, live-tail/repair bounds, transactional settle/rearm
writes, andmarmot-sessionrecipient-challenge hold evaluation onto shared helpers. - Maintenance queues an MLS self-update as soon as it detects stale chat capabilities, instead of scheduling it up to
five days out. The quiet period, contention jitter, and commit safety checks still apply. - Epoch-gap return visits now uncover a progressive lookback window on required relays only
(24hon visit 1,72hon visit 2,7don visit 3, full route coverage goal on visit 4+,
clamped by retention, route coverage goal, and rejoined-copy floor), sparing older proved
coverage on recent stalls and best-effort relays while still reaching older missing commits
before parking. GroupCatchingUpnow lifts automatically after 24 hours or once automatic epoch-gap recovery has
given up (parked after exhausting visits or dismissed viadismiss_history_notice), while keeping
acknowledge_group_catching_upduring the active bounded catch-up window.GroupRecoveryStatus::automatic_recovery_failedremains ABI-compatible and is now driven solely
by non-terminal parked automatic rejoin (GroupRejoinStatus::Parked); parked epoch gaps remain
surfaced viaHistoryNoticeandhistory_may_be_incomplete.RelayHealthChangedalso fires when an inbox check changes a relay's state, never when one confirms it.- The engine no longer awaits the account signer, which may be a remote NIP-46 signer (mdk#3498). Welcomes and
recovery control are sealed and unsealed by anInboxSealerthatmarmot-sessionowns: pass one to
SessionConfig::neworSessionConfig::with_storage(for Nostr,NostrInboxSealer::new(signer, clock)), and
buildNostrMlsPeelerwithout a signer. A new chat whose Welcomes cannot be sealed is still created; maintenance
delivers already sealed Welcomes before trying the signer for unsealed ones. It marks an unsealed Welcome expired
at its deadline without asking the signer. Prepared invites and recovery Adds bind their sealed Welcome rows
with the first commit fanout. If an invite is dropped during sealing or preflight, maintenance attempts to roll
it back and retries a failed rollback. - Wake-collection runtimes and clients configured with
CursorPersistence::Frozen(iOS Notification Service Extension and notification actions) now skip eager per-group MLS hydration on account open and reconnect, keeping lightweight routing indices active and hydrating only the specific group(s) targeted by an incoming push event, notification reply, or group query while suppressing unsolicited outbound fanout wakes, Welcome retries, and push-token gossip retries. - Eliminated per-quantum SQLite write locks on read-only recovery budget, probe, and reconciliation-inventory lookups, added partial hot-path indexes on
account_recovery_units(migration 0230), and removed the duplicate adapter live-count observation inside each recovery runner debt turn. - Moved
RecoveryRunnerNIP-11 relay-capability HTTP fetches ahead ofRecoveryCreditPoolpermit acquisition so slow or stalled NIP-11 fetches no longer hold scarce process-wide recovery credits across accounts or relay lanes. - Added bounded multi-
#hquiet-sweep batching (up to 16 overlapping group routes per relay) overSweepRelay::fetch_group_batch_sliceso quiet group routes on the same relay certify in oneREQ+EOSEround-trip when below the relay's cap, while strictly demuxing returned events by#htag, preservingOpenAttemptsand transactional settlement/refund semantics, and falling back cleanly to per-route sweeps on any capped,more-hinted, closed, or uncovered reply. - Added bounded per-relay concurrency lanes (up to 3 distinct relays concurrently, strictly at most 1 in-flight quantum per relay URL) in
RecoveryRunner's background loop so a slow or stalled relay cannot block healthy relays in the same account, while keeping foreground explicit passes/repairs deterministic and draining/refunding in-flight lanes cleanly on shutdown. - Refreshed
RecoveryRunner's per-spell reconnect-probe allowance on genuineConnectivityRestoredsignals while keeping duplicate reconnect flaps within the same outage spell capped at one probe. - Skip a duplicate outbox relay-list read when discovery already got a complete reply from that relay, even if another relay stalled. KeyPackage reads still follow route selection.
- Replaced dated nightly pre-releases (
*-nightly.YYYYMMDD,nightly-meta/latest.json) with daily canary-gated SemVer Release Candidates (<track>-vX.Y.Z-rc.N,rc-meta:rc/latest.jsonschema 2,rc/signature_delta.json) and one-click Stable promotion (promote-release.yml/just promote-rc). - Migrated strict directory reads (
fetch_directory_events_with_completion) intransport-nostronto chunkedFiniteRequestsusing per-REQ raw-vs-admitted EVENT accounting (raw_items == received_items) and retired the duplicateDirectoryWireTransportwrapper. SendIntent::UnlinkDevicemay keep the removed leaf's signature key in the slot'sremovedrecord once that leaf
has committed since its Add, and refuses anyremovedrecord while the removed leaf is still its link's KeyPackage
leaf (mdk#3679). Receivers are unchanged.- An invite's and a founding create's Welcome record
deliver_until: 7 days after
staging, or the KeyPackage'snot_afterif sooner, andoutbound_welcome_statusreports them
Settled(Expired)from then on (mdk#3589). A device link's deadline is unchanged.sent_welcome_deliver_untiland
the status hold a Welcome stored without a deadline to its transport timestamp plus the window. - Budget-expired deferred-peel evictions delete the deferred row from
cgka_messagesdirectly instead of calling
release_message_for_replay, so storage hosts are no longer notified via the release journal for budget-expired
rows, avoiding false epoch-gap arms,seen_eventsretirement, and relay bounce-backs. SendIntent::RecordRemovedSlotstages the loneremovedrecord with no tag signature key and refuses one that
keeps a key: its Commit removes no leaf and the roster has no entry, so nothing proves one (marmot#520).
SendIntent::ImportDeviceGroupRejectionsrefuses a carried record that keeps a key. A roster state that records a
slot asremovedwith no key holds the keys this device keeps for the slot as removed, unless one already is, so
the app still knows the record was held. Receivers are unchanged.wn messages send-eventaccepts kinds 1201 (agent item) and 1202 (answer or control) in the marmot-agents shape,
and refuses them in any other.- Timeline JSON gains
agent_item_first_event_missing, true for an agent item shown from its edits because its
first event is not on this device. - WN Agent refuses
send_agent_activityandsend_agent_operation_eventwithretired_agent_eventand publishes
nothing: MDK no longer builds the old shape of kinds 1201 and 1202. wn messages timeline listcarries a kind-1201 row's parsedagent_itemin--json, and shows an item MDK cannot
read, such as the old shape, as[unreadable agent item]instead of its payload.wn messages deleteby an admin of their own chat message sends an author kind 5 (empty content), not kind 4891,
so it syncs as deleted by its author.- Usage diagnostics count a Welcome naming another KeyPackage of this account (
NotAddressedToThisDevice) as
mdk_welcome_summaryprocessabsent, no longerduplicate: a device that sees only its siblings' Welcomes cannot
join, and counting them as copies hid it. No outcome value is added, so saved consent stays accepted. - Relay telemetry adds
app_runtime_member_key_package_read_*andapp_runtime_member_key_package_relay_read_*:
for each member a create, invite or invite recovery selects, whether its KeyPackage read heard every relay it asked,
and how many of those relays answered.MemberKeyPackageResolutionStats::key_package_readscarries the same counts.
Selection is unchanged. - Group creation, invites and direct-chat starts always discover the members' current relay routes after
prewarm_group_member_key_packages; prewarmed outboxes only add hints to the KeyPackage read, so a prewarm no longer
makes them skip discovery. AnIncompatibleKeyPackageverdict needs that discovery to complete, and a completed read
that finds no deletion request for the refused KeyPackage or its slot. - A member lookup that finds no usable KeyPackage reports
DirectoryLookupIncomplete, not a missing or incompatible
KeyPackage, while this device's KeyPackage journal keeps a publication of that member that the lookup did not account
for. The README's direct-chat section states what accounts for one and how long the journal keeps it. - A member lookup that finds no KeyPackage reports
DirectoryLookupIncomplete, not a missing KeyPackage, while a relay
list tied with the member's named a usable outbox that no KeyPackage read covered. - A member lookup treats a relay that the member's relay lists name twice, or with and without a trailing root slash, as
one relay: it reads the relay once and counts it once toward a read's limit. - Epoch-gap return visits now uncover a progressive lookback window on required relays only
(24h->72h->7d-> full route goal, clamped by retention, route goal, and rejoined-copy
floor) instead of wiping 30 days of proved coverage across all relays on visit 1, while still
reaching older missing commits before parking. AppError::GroupCatchingUpnow lifts after 24 hours or once automatic epoch-gap recovery has
given up (parked or dismissed viadismiss_history_notice).GroupRecoveryStatus::automatic_recovery_failedis driven solely by non-terminal parked automatic
rejoin (GroupRejoinStatus::Parked); dead Gen-1 fruitless-completion evidence persistence has been
removed fromEpochStallDetectorandAppClient.RelayWarningKind::NoAllowedInboxRelayalso fires when every inbox entry is refused orFailing, and names every
entry.RelayHealthChangedalso follows check results.- The lone
removedrecord a deciding device commits after a failed link's undo, and eachremovedrecord a device
group move carries into its destination, keep no tag signature key (marmot#520). Neither Commit proves a key, so
receivers that checkremovedrecords would refuse one that kept it. Devices that applied the slot's entry still
clean up by the key they kept, and the lone record is still made once. Receivers are unchanged. - A member's
MARMOT_MEMBER_RESOLUTION_STATUS_INCOMPATIBLE_KEY_PACKAGEnow requires completed relay-list discovery,
complete KeyPackage reads and a completed read that finds no deletion request for the refused KeyPackage or its
slot. If any is incomplete, the status isMARMOT_MEMBER_RESOLUTION_STATUS_INCOMPLETE. - A member with no usable KeyPackage is
MARMOT_MEMBER_RESOLUTION_STATUS_INCOMPLETE, not missing or incompatible, while
this device's KeyPackage journal keeps a publication of theirs that the lookup did not account for. The shared API
guidance formarmot_start_direct_chat_with_optionsstates what accounts for one and how long the journal keeps
it. - A member with no KeyPackage is
MARMOT_MEMBER_RESOLUTION_STATUS_INCOMPLETE, not missing, while a relay list tied with
theirs named a usable outbox that no KeyPackage read covered. - A member lookup treats a relay that the member's relay lists name twice, or with and without a trailing root slash, as
one relay: it reads the relay once and counts it once toward a read's limit. - Group creation, invites and direct-chat starts always discover the members' current relay routes after
marmot_prewarm_group_member_key_packages; prewarmed outboxes only add hints to the KeyPackage read, so a prewarm
no longer makes them skip discovery. - Source builds generate
marmot.hwith cbindgen. Release bundles still include the matching header. - A member's
MemberResolutionStatusFfi::IncompatibleKeyPackagenow requires completed relay-list discovery,
complete KeyPackage reads and a completed read that finds no deletion request for the refused KeyPackage or its
slot. If any is incomplete, the status isMemberResolutionStatusFfi::Incomplete. - A member with no usable KeyPackage is
MemberResolutionStatusFfi::Incomplete, not missing or incompatible, while
this device's KeyPackage journal keeps a publication of theirs that the lookup did not account for. The API
reference forstart_direct_conversation_with_optionsstates what accounts for one and how long the journal keeps
it. - A member with no KeyPackage is
MemberResolutionStatusFfi::Incomplete, not missing, while a relay list tied with
theirs named a usable outbox that no KeyPackage read covered. - A member lookup treats a relay that the member's relay lists name twice, or with and without a trailing root slash, as
one relay: it reads the relay once and counts it once toward a read's limit. - Group creation, invites and direct-chat starts always discover the members' current relay routes after
prewarm_group_member_key_packages; prewarmed outboxes only add hints to the KeyPackage read, so a prewarm no longer
makes them skip discovery. - A new account database applies its schema through migration 227 in one transaction from a checked-in baseline,
then replays only later migrations. Opening a fresh account no longer replays every migration, which took seconds.
Databases with any recorded migration are unchanged. - Made
recovery_account_usage,recovery_account_paused_until, and non-duearm_due_recovery_probesstrictly read-only, and added an empty-table fast path torecovery_coverage_newest_released.
Deprecated
wn messages timeline subscribe,wn chats subscribe-archived,wn groups subscribe-stateand
wn notifications subscribeserved the terminal UI. They still work unchanged and will be removed in a future
release.
Removed
- Retired the
nightly-releases.ymlworkflow andnightly-meta/latest.jsonupdate stream; retention continues expiring legacy*-nightly.*pre-releases older than 30 days. - The terminal UI is gone:
wn tuino longer exists. This is a breaking change for anyone who used it; every chat,
group and message action it offered is awncommand. A home the TUI ran in may keep atui-media-cache/
directory; after an unclean exit it can hold decrypted attachments. Delete it by hand. wn settings themeis removed. It was meant for the TUI, which never read it.wn settings showno longer prints a
themefield, and athemevalue in an existingsettings.jsonis ignored.
Fixed
marmot-appaccount workers now track, cancel, and drain all worker-spawned async and blocking tasks (media HTTP transfers, attachment and avatar store completion, housekeeping/sweep/migration passes, retry timers, and post-create catch-up) before teardown evicts caches or removes account directories, and pass already-open storage handles instead of reopening databases in background tasks.marmot-appnow acquires account teardown fences in one canonical order acrossremove_account,deactivate_account, andreset_incomplete_account_setup, preventing lock-order inversions and unfenced setup resets.marmot-appnow splits host group-scoped and account-wide worker channels so parking account-wide commands atPARKED_LIMITduringCheckSignInsno longer starves group commands, and bounds in-memory deferred worker command queues with channel backpressure.UnlinkedPublishGatenow caches per-account resolution without rescanningaccount.jsonon every call and always returns the shared account stop handle so recovery orlift_failed_link_publish_stopunblocks existing publishers after transient lookup errors.- Dropping
subscribe_messages,subscribe_timeline_messages,subscribe_chats,subscribe_group_state, orsubscribe_notificationsnow exits its background forwarding task immediately instead of leaking broadcast receivers until runtime shutdown. - Hardened low-level runtime hygiene in
marmot-app: replaced unchecked mutex.lock().unwrap()calls inclient/sync.rs, stopped emitting rejected or device-group-kind application messages intoSyncSummary.events, and made reconnectdrain_deferred_hydrationcancellation-aware on shutdown. - Batched the recovery runner's re-check survey into one storage read and reused the unit states and relay cooldowns
already loaded by the debt survey, eliminating hundreds of per-unit SQLite lock acquisitions on every recovery step
for accounts with many chats. wn-agentanswers a control request it cannot read with anerrorresponse instead of closing the connection
silently (mdk#2242):unsupported_protocolfor a missing or wrongmarmot_agent_control,unknown_requestfor an
unknowntype, andinvalid_requestfor anything else, naming a missing or repeated field and echoing the request
idwhen it could be read.- Detached quorum-met secondary relay publishes for frozen
OutboundFanoutcommits and application messages into background completion tasks inmarmot-sessionandmarmot-appinstead of cancelling them at quorum, preventing spuriouspublish_acknowledgement_unknownfailures, secondary relay socket teardowns, and 30-second retries. - Migration
0233_drop_gen2_recovery_tablescleans up any pre-PR-#3877 leaked group-route recovery
rows and orphaned group recovery rows across Gen-3 ledger tables, advancing
account_recovery_coverage_uncover_state.pruned_throughand pruning relays referenced solely by
leaked rows. - Post-begin
debt_turnfailures inRecoveryRunnernow refund the open unit/re-check attempt as
Unansweredinstead of leaving an unsettled attempt open until runner stop. - Multi-step
RecoveryRunnersettle, reconnect, and explicit repair re-arm storage writes now run
atomically insideSqliteAppStorage::with_transaction. - An invite's or new chat's Welcome that reaches its delivery deadline (mdk#3589) now ends for good the first time MDK
sees the deadline passed while the Welcome is owed: a device clock set back afterwards no longer makes it sendable
again, andredeliver_welcomepublishes nothing for it. A Welcome still staged with its unconfirmed commit is read
by the clock until that commit resolves, so a clock set back meanwhile can let it go out once the commit confirms. Its v5welcome_withdrawnrow with reasonexpiredand its
InviteDeliveryChangedare recorded once, also when the deadline passed while the app was closed: then on the next
start. A relay attempt that started before the deadline and fails after it no longer reports
WelcomeDeliveryPending. On the first start after this upgrade, every Welcome already past its deadline is recorded
this way. - An invite's or new chat's Welcome that no inbox relay stores is no longer retried for weeks (mdk#3589). It has a
delivery deadline, 7 days after it was made or its KeyPackage's expiry if sooner; after that nothing sends it, not
the startup retry, maintenance orredeliver_welcome, it leavespending_welcome_deliveries, and
invite_deliveriesreads itUndeliverablewith what its latest attempt found. When the deadline passes while the app runs, the v5
audit records the end aswelcome_withdrawnwith reasonexpired. A Welcome owed from before this upgrade is held to 7 days from its gift
wrap's timestamp, so the oldest end on the first start. The startup retry no longer skips relay backoff: it asks
only relays never asked and those whose backoff has passed. The invitee stays a member. - Cancelling a Swift task now cancels the throwing MarmotKit call it awaits, commands and subscription receives
alike, and releases the native references that call holds withoutshutdownAndClose()(mdk#3670). Calls whose
work must finish, such asshutdownAndClose(),removeAccount(),signOut(),signOutAndWipe()and thelogin*
calls, still run to completion, and the receives generated withoutthrowsgain throwingnextCancellable()
adapters. An audit of every async export found eight whose steps could be torn by a cancel; they now keep running
when a Kotlin or Swift caller cancels them: sign-out, sign-in, account removal, the three logins, NIP-46 signer
removal and the audit-log switch. Overlapping audit-log switch calls end with the last stored value. - When the app's account worker publishes a Welcome (an invite's, a new chat's, or a retry of either), the first pass
now reaches every inbox relay of its recipient, not only the first relay that acknowledged it. Each relay is asked
on its own. The Welcome is still marked delivered at the first acknowledgement, and the host and the account worker
do not wait for the other relays. Their answers are recorded once all of them have answered. If the worker stops
waiting first (at the shutdown bound, a reconnect, sign-out or unlink), nothing more is recorded: those relays stay
owed and are retried after their backoff, and one that already stored the Welcome answers duplicate. A Welcome whose
only acknowledgement came from a relay that accepts gift wraps but cannot serve them back no longer depends on a
retry 30 seconds later, which a closed app never ran.redeliver_welcomeand runtimes that publish Welcomes inline
still stop at the first acknowledgement. - An invite's Welcome whose recipient has no usable inbox relay no longer retries, and records a routing failure, on
every maintenance pass while it is owed (mdk#2261, in part). Its recipient is retried 10 minutes later, then at
doubling intervals up to 6 hours; the pacing is kept in memory, so each app start still makes one attempt. Each
retry uses the recipient's inbox route as the account last loaded it from the local directory cache: MDK does not
look the recipient's relay list up again, so such a Welcome still goes out only once a new list reaches the cache
and the route table, in practice through a new invite to that person. The audit records why no route was found:
no_eligible_routefor an empty or unusable list,route_resolution_failedfor no list known. - A device linked soon after another no longer shows the account's accepted chats as invitations for up to an hour,
where a decline turned into a leave on every device (mdk#3556). Each device broadcasts its small state to a newly
listed device at once, and adds it to a chat only after that chat's invitation decision went out. During a relay
outage the chat can still show as an invitation until the decision is delivered. The account database advances to
schema 222. - Automatic recipient rejoin in
Phase::Challengeno longer burnsMAX_RECIPIENT_ATTEMPTSwhile
its trusted device group is held by an epoch gap; maintenance waits until the hold expires. - A group with an empty-required retained prior route no longer skips epoch-gap return visits on its
servable current route. - An epoch-gap visit whose required sources all stop pursuing (broken without a live probe, retired,
or saturated) now finishes with backoff and parks visibly instead of lockingin_progressforever. - Releasing a receipt for a group with an already-exhausted epoch gap no longer un-parks and flickers
itsHistoryNotice. - Leaving a stalled epoch onto a
ContestedForkDeferralnow clears the superseded older
stalled_epochintent and handoff while still scheduling local convergence. TransportDeferredCapacityresource refusals emitted in bothGroupEventandIngestOutcome
during one ingest are now observed once by the stall detector.- Admitted finite requests in
transport-nostr-adapteragainst a shared global queued-byte budget (192 MiB default, FIFO reservation with single-request exclusivity above capacity and sharing-group reservation soFiniteRequests::sharingreserves its shared budget once plus one private frame per active relay) so concurrent sweeps and directory reads bound queued frame memory without starving peer relays. - Purged all route-keyed recovery ledger, unit, fence, staged-event, loss-bound, and copy tables (plus relays referenced exclusively by deleted routes) atomically when routes are deleted, terminal groups are locally deleted, or groups are forgotten locally under
secure_delete. - Pruned empty retired
account_recovery_unitsrows and aged unreferencedaccount_recovery_relaysrows during retention pruning (prune_recovery_coverage) so dropped relays and routes do not accumulate permanently. - Prioritize open conversations (fenced open conversations first, then unfenced open conversations and the account inbox) ahead of background fenced groups in the history recovery runner so a batched group live-REQ fence cannot starve the active chat or incoming Welcomes.
- Unified GroupContext admin-policy (
0x8003) and group-lifecycle (0x800c) validation across Legacy and Current profiles, rejected caller-supplied0x800coverrides during group creation andUpdateAppComponents, rejected joiningDisbandedWelcomes in both profiles, and tightened wire bounds onDeviceRosterV1::devicesandSiblingWelcome::decoderelay lists (#3795, #2455, #2456). AccountDeviceRuntime::key_package_network_maintenance_dueandmaintenance_dueno longer report KeyPackage publication work as continuously owed when zero writable KeyPackage publication endpoints are configured, while keeping private-material expiry deadlines scheduled (follow-up to #3777).- Expired KeyPackages can now be retired from local MLS storage after their lifetime elapses, and session maintenance no longer republishes, fans out, or retains expired pending or current KeyPackages (mdk#3730).
- Fallback KeyPackage relay routing now excludes relays that the account's NIP-65 list explicitly declared as read-only when declared write relays are empty or unsafe, and persisted KeyPackage retries honor current relay policy without stranding empty-route intents (mdk#3730).
- Background KeyPackage maintenance (startup cutover, worker maintenance, KeyPackage catch-up, and automatic group-recovery recipient Challenge publication) is now deferred while interactive onboarding is unfinished, unifying invite/group recovery and KeyPackage catch-up under
maintenance_passes(mdk#3730). - Resend a device's current KeyPackage when a relay that previously accepted it serves the device's older KeyPackage again.
- Switched
transport-nostr's live directory notification forwarder from SDK first-seenClientNotification::Eventto per-messageClientNotification::Message(RelayMessage::Event)with independent supplied-bytes verification on every copy so SDK pool deduplication cannot hide later relay copies or rebuild replays. - Guarded
nostr-directory's cached KeyPackage and kind-3 contact-list ingestion against older or equal-second stale replays and existing KeyPackage deletion/replacement barriers, and cleared cachedentry.key_packageentries when live kind-5 deletions or newer malformed kind-30443 replacements fence them. - Hardened
media-storelocal file handling and concurrency invariants (mdk#3799, mdk#2554): in-flight file tracking
now uses per-file reference counts so concurrent readers and sweeps do not drop active leases prematurely, cached
readers check a revocation generation before re-insertion (invalidated both before and after loss commits) and mark
missing files lost on reopen without swallowing catalog errors, reopen and trim paths reject symlinks and non-regular
files (clearing invalid wire checkpoints and continuing sweeps without opening them), writer buffers zeroize on drop
and honor poisoned state on flush, catalog sweeps verify regular files and valid layout sizes, and file-length/offset
math uses checked arithmetic. - Hardened
marmot-accountaccount-wipe cleanup and local secret I/O (mdk#3799, mdk#819, mdk#2145): account removal
now resolves shared-credential checks before the tombstone rename commit and unconditionally scrubs tombstoned local
secret files and removes the tombstone directory post-commit before propagating any independent secret-store deletion
error; Windows secret reads verify live handle linkage so scrubbed or moved-aside handles are rejected and retried;
tombstone roots use owner-only permissions; local secret reads reject symlinks and oversized files and pre-allocate
the bounded zeroizing buffer; and zero-scrub overwrites use bounded fixed chunks. - Hardened
fs-privatelocal directory, file, and Unix socket helpers (mdk#3799): directory and file opens pass
O_NONBLOCK, private file helpers verify regular files and tighten permissions before truncating, and private Unix
socket binds serialize staging within a process so concurrent same-PID binds cannot collide. - Odin hosts can statically link the Markdown parser without duplicate runtime symbols. The parser also builds for
GNU Windows targets with LLVM-MinGW. - Bounded secondary catch-up
RetryableUnavailableretries on already-confirmedOutboundFanoutcommits and already-accepted application messages with exponential backoff (5sdoubling up to1h) and a24hsecondary catch-up retention TTL so dead secondary relays do not spin or accumulate perpetual fanout rows, while keeping below-quorum and unconfirmed (Pending) commits on prompt5sretries without ever expiring them. - Aligned
transport-nostr-adapterper-attempt publish timeouts (6sSDK OK/AUTH wait,7sattempt ceiling,500msretry backoff,5sconnect wait) strictly inside the20souter publish deadline (SDK_RELAY_PUBLISH_OVERALL_WAIT), preventing second publish attempts from being aborted mid-flight on slow relays. - Consolidated maintenance Welcome retries onto detached background Welcome waves (
WelcomeRuns), aligned unmet Welcome retry retention todeliver_until(clamping to24hsecondary catch-up only afterrequired_acksis met) soattempt_countand hourly exponential backoff do not reset daily, and reconciled unmet Welcome targets against current inbox routing so updated or cleared kind-10050 lists take effect promptly. - Paced due maintenance
SelfUpdatecommits to at most two per maintenance pass, prioritizing manual and post-join rotations ahead of periodic leaf-refresh backlogs so multi-group upgrades or resumes do not trigger burst commit storms. - A finite history read whose caller stops polling it while its REQ waits to be queued no longer holds up live
events on that relay connection. Before, the read could hold the SDK's subscription lock until it was polled
again. - Quiesced three permanent 15-second background wake loops: watched Welcomes held by fanout backoff, route-retry pacing, or detached publishes now schedule maintenance at their stored retry/expiry times; parked
Unrecoverablegroups and manual rejoin offers awaiting explicit confirmation no longer keep session maintenance owed; and parked (NeedsDeepRepair) epoch-gap demands no longer keep the 15-second recovery seam polling. - Coalesced contiguous covered and retired spans in periodic NIP-77 recovery re-checks and clamped re-checks to a
rejoined group's copy floor (excludingBeforeThisCopyspans), eliminating high-request re-check storms over
fragmented pre-rejoin history. - Scoped
CursorPersistence::Frozenwake-collection recovery (such as iOS Notification Service Extension wakes)
strictly to groups that actually hold a buffered live frame behind a fence and suppressed background epoch-gap
backfill visits during non-repair frozen wakes, avoiding account-wide sweeps across quiet unhydrated groups. - Reconnecting a relay now immediately clears per-unit unreachable retry waits on that relay (while keeping timed
probes for parked broken units intact), so live-fenced groups resume history recovery and message delivery without
stalling for the 30-second unreachable retry wait. - Fixed a
RecoveryRunnerbackground multi-lane deadlock where polling per-relay lanes in-task viaFuturesUnorderedcould leave a lane holding a FIFO permit on the bounded worker-turn channel whileplan_background_lanesawaited its own turn; background lanes now run on atokio::task::JoinSet(abort-on-drop, cleanly drained on shutdown and foreground passes/repairs) andAccountRunnerHost's turn channel is sized to1 + RUNNER_MAX_CONCURRENT_RELAY_LANES. - Fixed
SqliteAppStorage::transport_reconciliation_inventory_in_rangeopening a raw nested deferred transaction when called insideSqliteAppStorage::with_transaction, which caused multi-groupRecoveryRunnerbatch planning (select::begin_batch) to fail withLocalFailureon NIP-77 relays. - Fixed
RecoveryRunnerbackground multi-lane scheduling droppingnext_duewhen spawning fewer thanmax_concurrent_relay_laneslanes so a cooling or backed-off relay now wakes on schedule even while a slower lane stays in flight. - Engine audit error details use a closed classifier without forwarding free-form error text, projection error display
omits raw message identifiers, symmetric key holders and group-image transfer types redactDebugoutput and erase
keys on drop, and SQLCipher salt reads enforce a size limit without including account paths in errors (mdk#3796). marmot-app: Disappearing-message retention sweeps now query SQLite directly for groups with expiring rows instead of skipping groups whose current policy is0or omitting non-chat-list groups, so previously sent disappearing messages still expire after retention is turned off.RetentionSweepReport.groupsnow lists only visible groups that had expired rows at sweep time.marmot-app: Backup passes now require complete multi-relay pointer discovery before condemning blobs or replacing pointers, and bound replacement pointer timestamps (including persisted replaceable-record floors) against excessive future clock skew.marmot-app: Blossom uploads and deletions now complete host and dial-safety validation before signing BUD-01 authorization events.marmot-app: Host-facing Welcome redelivery now enforces group visibility so internal device-group Welcomes remain hidden from host redelivery calls.- Bounded active dry-run NIP-77 comparisons in
transport-nostr-adapter(sync_watching_neg_cap_detailed) by the caller'sdeadline, so a relay sending non-convergingNEG-MSGframes that continually resetidle_timeoutcannot hold a per-relay NEG permit indefinitely. - Stopped the account worker from retrying epoch-pinned invitation-decision sends on every unrelated loop turn while the trusted device group is still settling a local commit or pending convergence inputs.
- Hardened
storage-sqlitedatabase opening, deletion, compaction, and directory/media-catalog operations: SQLCipher
compatibility and busy-timeout pragmas now apply in the order SQLCipher requires, migration0228and all
storage-sqliteread/write boundaries canonicalize persistedgroup_id_hexvalues and checkpoint scopes to lowercase
ASCII, key-package eviction watermarks preserve stronger deletion barriers across batch evictions, read-then-write
storage transactions acquire immediate write locks under WAL contention, media-catalog paging and compaction recovery
handle limits, retries, and close interrupts cleanly, and secure pruning scrubs full UTF-8 byte lengths and removes
invalidated edits targeting pruned messages. - Swift bindings no longer deadlock when cancelling an async MarmotKit
Taskconcurrently with a nativeRustFuture::wake(mdk#3821):uniffiRustCallAsyncnow dispatches native future cancellation off Swift'sonCancelhandler (avoiding lock-order inversion betweenAsyncTask'sStatusRecordLockanduniffi_core::RustFuture's scheduler mutex) and checksTask.isCancelledbefore polling so a pre-cancelled or woken-after-cancel task does not issue another native poll. - Shared relay-wide
observed_capevidence across units of the same route kind on the same relay and added timestamp-guided single-event splitting for history sweeps on relays without a published NIP-11max_limit, avoiding blind halving traps on sparse chats while keepingSliceProofstrictly evidence-based. - Capped the recovery runner's idle sleep at 15 minutes when a future deadline is scheduled and woke the runner on
ConnectivityRestoredso mobile suspend/resume and wall-clock jumps do not leave overdue probes or retries asleep. - Removed the redundant account-wide
require_fresh_activation()andprepare_transport()teardown from post-join history collection, relying on targeted group-subscription sync and per-route family reissue (including on rejoins) so healthy inbox and unrelated group subscriptions stay intact, and fixedobserve_replay_boundaryso a fresh relay reader afterdeactivate_account+ re-activation is treated as an initial session connection rather than mid-sessionReceiverLosswhile still rejecting stale frames from the deactivated reader. - Preserved durable relay
unreachable_streakand exponential cooldown state across bare reconnect notifications until a recovery attempt actually answers, allowing at most one bounded reconnect probe per continuous outage spell (spent as soon as the probe begins so timeouts cannot spin) so 5-second reconnect flaps cannot reset backoff, and prioritized healthy relays (unreachable_streak == 0) ahead of degraded relays in recovery selection. - Switched live kind-1059 inbox delivery in
transport-nostr-adapterfrom SDK first-seenClientNotification::Eventto per-messageClientNotification::Message(RelayMessage::Event)with independent supplied-bytes verification, preventing SDK pool deduplication from hiding later relay copies or replays after retired attempts or queue drops. - Shut down authenticated publish SDK clients on eviction (once caller references drop), account deactivation, and
MarmotRelayPlane::shutdown(), and shut down adapter-owned anonymous publish SDK clients when the last adapter clone drops or the account is deactivated (leaving held adapters usable across receive-plane shutdown); joined in-flight delivery spill writers and loss-marker persistence tasks during plane shutdown, and switched discarded NIP-46 signer transports fromdisconnect()toshutdown(). - An invite's Welcome whose recipient has no usable inbox relay (no kind-10050 list known, an empty one, or none this
device may dial) is now delivered once the recipient's list can be found, without a re-invite (mdk#2261). After each
paced retry that finds no route (10 minutes, doubling, at most 6 hours, and once per app start), MDK looks the
recipient's inbox relay list up again beside the account worker, at most four lookups per account at once and 30
seconds each, and sends the Welcome as soon as the list gives a route. Whether an owed Welcome still needs the
lookup is checked when it starts and at each worker turn. A failed lookup shows as the newInboxLookupFailed
problem ininvite_deliveries, and the next attempt that finds no route records the existing v5
route_resolution_failedreason. drain_eventsno longer keeps the peak allocation of a large event backlog: a drain larger than one background
replay sweep (128 events) hands its buffer to the caller and leaves a bounded one behind, while routine drains still
reuse the buffer (mdk#3585).- Re-deferring an unopenable
PeelDeferredrow across an epoch sweep preserves its original arrival epoch instead of
restamping it to the tip epoch. - Deferred-peel sweeps at the retry-budget or residence-budget cutoff attempt a newly arrived peel context once before
deleting the row, so a commit that unlocks the row on the cutoff sweep decrypts instead of being discarded. - Replaced raw-pointer RAII cleanup guards (
PendingCommitCleanupGuard,NewGroupCleanupGuard, and
PreparingEvolutionGuard) withArc<S>stored onEngine<S>, eliminating raw-pointer aliasing UB and allunsafe
blocks incgka-enginewithout changing public API signatures. - Validated and allocated pending-publish state before committing durable staging rows across all commit-staging paths,
ranPendingCommitCleanupGuard's pending-commit and stored-proposal cleanup inside one storage transaction, and
retained ownership of failedSelfRemovestaging cleanups across engine retries, outbound sends, and session-open
hydration (quarantining the group withPendingCommitRecoveryFailedif a storage fault persists until hydration
retry) so failed staging leaves neither orphaned SQLite records nor wedged proposal queues. - Audit error details use a closed classifier rather than forwarding raw error display strings, and
OpenMlsProjectionError::Displayomits raw message identifiers (mdk#3796). - A Welcome now joins a group in which a member never committed after being added and the KeyPackage lifetime that
member's leaf still carries has ended. The join no longer judges the lifetimes of leaves already in the tree (RFC
9420 §7.3); each was judged when its Add was committed and applied. Before, every Welcome into such a group failed
for every invitee, and the delivery was ignored asinvalid_encoding. - Opening directory caches from several threads on an app root's first start (a new install, or the first start of a
build that cleans up future-dated caches) no longer deletes a cache another thread had just opened (mdk#3895). That
cache then failed withSQLITE_READONLY_DBMOVEDuntil the app restarted. The one-time cleanup now finishes before
any cache opens. - An invite's Welcome past its delivery deadline (mdk#3589) reads
Undeliverableininvite_deliveriesfor good once
MDK has seen the deadline pass with the Welcome owed (its commit confirmed), even if the device clock is set back, with oneInviteDeliveryChanged: on the next
start when the deadline passed while the app was closed, sent before the account worker's first turn. A relay attempt that started before the deadline and fails
after it no longer reportsWelcomeDeliveryPending. - Removing a linked device that rewrote or cleared its own roster entry's tag signature key removes its device-group
leaf: removal and chat cleanup also find a committed leaf by a device tag that names the slot and verifies under that
leaf's own key. A device that moved to another device group keeps its chat leaves whatever keys its slot had, and a
removed device's leftover chat leaf is still counted past 30 days (mdk#3679). - An invite's Welcome past its delivery deadline (mdk#3589) is no longer sent by the startup retry and leaves
pending_welcome_deliveries;invite_deliveriesreads itUndeliverable. The startup retry keeps relay backoff. - A device removed from the account can no longer change its siblings' small state (mdk#3680). It kept its last
device-group epoch's keys for the app-message window, so until the device group moved five more epochs it could
still send updates and broadcast requests, and a decline or read position at the highest version could not be
undone. A device now takes a small-state update or broadcast request only from a leaf whose device tag reads, at
the message's epoch, as a device its roster lists, and sends its own only once its leaf is tagged: a newly linked
device's first broadcast waits for its tag commit instead of going out untagged. - When the app's account worker publishes a Welcome (an invite's, a new chat's, or a retry of either), the first pass
now reaches every inbox relay of its recipient, not only the first relay that acknowledged it. Each relay is asked
on its own. The Welcome is still marked delivered at the first acknowledgement, and the host and the account worker
do not wait for the other relays. Their answers are recorded once all of them have answered. If the worker stops
waiting first (at the shutdown bound, a reconnect, sign-out or unlink), nothing more is recorded: those relays stay
owed and are retried after their backoff, and one that already stored the Welcome answers duplicate. A Welcome whose
only acknowledgement came from a relay that accepts gift wraps but cannot serve them back no longer depends on a
retry 30 seconds later, which a closed app never ran.redeliver_welcomeand runtimes that publish Welcomes inline
still stop at the first acknowledgement. - An invite's Welcome whose recipient has no usable inbox relay no longer retries, and records a routing failure, on
every maintenance pass while it is owed (mdk#2261, in part). Its recipient is retried 10 minutes later, then at
doubling intervals up to 6 hours; the pacing is kept in memory, so each app start still makes one attempt. Each
retry uses the recipient's inbox route as the account last loaded it from the local directory cache: MDK does not
look the recipient's relay list up again, so such a Welcome still goes out only once a new list reaches the cache
and the route table, in practice through a new invite to that person. The audit records why no route was found:
no_eligible_routefor an empty or unusable list,route_resolution_failedfor no list known. - A newly linked device no longer waits up to an hour for its siblings' small state, showing a chat the account already
accepted as an invitation, with an "invited you" notification, when every sibling broadcast within the last hour
(mdk#3556). A device whose trusted roster lists a device its last broadcast was not made for broadcasts at once, and
adds that device to a chat only once it has sent the chat's invitation decision. A send that reaches no relay holds
the Add for a later pass instead of letting the Welcome go first. Invitation decisions now go out before other small
state, and a winning decision read from an update older than the last broadcast is sent again. While no relay
acknowledges the decision's page, the Add can still go first and the chat shows as an invitation until the session's
retry delivers it. - An admin deleting their own chat message sends an author kind 5, so every client shows it as deleted by its author
(DeletionSource::Author) rather than by an admin. Kind 4891 is for another account's content only. - A member removed from a chat, or who left it, and then added back gets a kind-1210 "member added" row naming who
added them, the same row the adder's timeline shows. - The README now states that chat history imported from another device, and backups, leave out group system rows
and deleted-message placeholders, and why. - A locally deleted chat that a newer message brings back keeps the invitation standing it had (mdk#3555): an
unanswered invitation comes back pending with its inviter, and a sibling Add forwards it as pending, instead of
showing a chat the user never accepted. A sibling's accept or decline that arrived while the chat was deleted is
re-applied when it comes back. A chat deleted before this release comes back accepted, as before. - Automatic rejoin passes epoch-gap-held groups into
prepare_group_recovery_holdingso held device
groups do not burn recipient rejoin attempts. - Multi-route groups with an empty-required retained prior route still run epoch-gap visits on their
servable routes. - Epoch-gap visits whose required sources all become broken (without a probe), retired, or saturated
finish with backoff and park visibly instead of staying lockedin_progress. - Leaving a stalled epoch onto a
ContestedForkDeferralclears the superseded olderstalled_epoch
intent and pending handoff while still scheduling local convergence. TransportDeferredCapacityrefusals present in bothGroupEventandIngestOutcomeon one
ingest are observed once instead of twice.- Existing-key onboarding searches public records without prompting external signers. An inbox relay can request one authenticated check if anonymous checks fail. A stalled signer pauses for reconnection and retry, and repair signing has a deadline (#3725).
- Existing-key setup offers signer reconnection when an external signer cannot authorize an inbox check. If a signed inbox check fails at a relay, Retry can try another relay already listed in the account's inbox declaration.
- Preserve verified relay-list records returned before an incomplete, NIP-67, or
CLOSEDinspection end, classify persistent NIP-67authhints asAuthenticationRequired, classifyrate-limited:and bareerror:CLOSEDreasons as transient, retry transient relay-list lookups once withinCHECK_WAIT, and fail fast on bareauth-required:CLOSEDreplies without anAUTHchallenge (#3721, #3724). - Reuse completed kind-10002 EOSE answers on the
Relaysstep without redialing declared endpoints, and prevent incomplete lookups from overwriting a newer checkpointed relay list with an older copy orNone(#3721, #3728). - Lossless one-click relay repair preserves invalid URLs, unknown markers, and long (>16) NIP-65 lists (marking long previews inconclusive), and copies allowed
r-tag URLs intorelaytags on kind-10050 inbox lists while keeping the 16-relay inbox cap (#3727). - Preserve an unapproved relay repair proposal as
inconclusiveunder a bumped revision when one source fails during approval while an authoritative source still confirms the basis is newest (#3722). - Surface per-relay refusal findings on repair publication and initial KeyPackage publication; offer
CancelRepairandEditRelaysafter definitive all-target repair refusals, and offerEditRelaysto update NIP-65 write relays when initial KeyPackage publication is refused (#3723, #3747). - History-bundle file keys and group-image upload/download records redact
Debugoutput and erase key material on
drop, and SQLCipher salt reads enforce a size cap and omit account paths from errors (mdk#3796). - An invitation answer refused while the device group's epoch settles goes out on the worker turn after it settles
also when a maintenance pass in between ends early on a failed read, instead of waiting for the 15 s maintenance
retry (mdk#3573). - An invitation answer that a linked device must send again after a fork between linked devices goes out on the
worker turn after the device group's epoch settles, instead of waiting up to 15 s for the next maintenance pass
(mdk#3573). - When a live receive's state save fails, the worker's short retry still runs if a route sync succeeds in between.
Before, an activity delivered once by that receive waited up to 15 s for the next maintenance pass. - A device-group message pinned to an epoch is refused before it writes its withdrawal record while this device's
own device-group commit is still unpublished. Before, each retry in that window wrote a record that could push
older ones out of the bounded record table. - An owed invite Welcome with no usable inbox route is delivered once the account worker's lookup of the recipient's
inbox relay list finds one (mdk#2261): the worker looks the list up after each paced retry that found no route, and
sends the Welcome without a re-invite. marmot_invite_deliverieskeeps reportingMARMOT_INVITE_DELIVERY_STATE_KIND_UNDELIVERABLEfor an invite's Welcome
that no relay acknowledged by its delivery deadline (7 days after it was staged with the invite, or its KeyPackage's
expiry if sooner; mdk#3589), once its invite's commit is confirmed even if the device clock is set back, and the change is announced once: on the next start
when the deadline passed while the app was closed.marmot_invite_deliveriesnow reportsMARMOT_INVITE_DELIVERY_STATE_KIND_UNDELIVERABLEfor an invite's Welcome
that no relay stored by its delivery deadline, 7 days after the invite or its KeyPackage's expiry if sooner
(mdk#3589); that Welcome is never sent again and leavesmarmot_pending_welcome_deliveries.- An invite's Welcome that no relay acknowledged by its delivery deadline (7 days after it was staged with the invite,
or its KeyPackage's expiry if sooner; mdk#3589) readsUndeliverableininvite_deliveriesfor good once its
invite's commit is confirmed, even if the device clock is set back, andInviteDeliveryChangedannounces it once: on the next start when the deadline passed
while the app was closed. - An invite's Welcome that no inbox relay stores is no longer retried forever (mdk#3589). It is sent until its delivery
deadline, 7 days after the invite or its KeyPackage's expiry if sooner, then readsUndeliverablein
invite_deliverieswith its latest attempt's problem, and leavespending_welcome_deliveries. A Welcome owed from
before this upgrade is held to 7 days from its gift wrap's timestamp. The startup retry now keeps each relay's
backoff. The invitee stays a member. sign_out,sign_in_account,remove_account,login,login_external_signer,
login_recovering_incomplete_setup,set_audit_log_settingsandnip46_removekeep running when their call is
cancelled, on Kotlin and Swift (mdk#3670). A cancel between their steps could leave a withdrawn KeyPackage slot on
a signed-in account, a paused setup that sign-in never resumed, an account whose moderation reports were already
purged, a half-imported account that a retry rejects as existing, a worker still using a removed signer, or running
sessions that disagree with the stored audit-log switch. Running sessions now apply the stored audit-log switch, so
overlappingset_audit_log_settingscalls end with the last stored value.- An admin's own message deletion now reports
deletionSource: Author, and a member added back to a chat after being
removed or leaving gets a "member added"groupSystemrow naming who added them. - Swift
uniffiRustCallAsyncno longer ABBA-deadlocks whenTask.cancel()races withRustFuture::wake(mdk#3821): cancellation is dispatched off Swift'sonCancelhandler sorust_future_cancelnever acquiresRustFuture's mutex whilelibswift_ConcurrencyholdsAsyncTask'sStatusRecordLock, and the poll loop checksTask.isCancelledbefore each native poll. - A chat's
activity_sort_atis its latest message, read position or retained floor, and falls back to
conversation_created_atonly when it has none. A chat a linked device or a restore stored after it began, with
older history imported, no longer sorts at the time this device stored it (mdk#3580). Migration 0220 re-sorts the
rows the old rule anchored at creation. - Migration 0222 adds
small_state_broadcast_devices: the roster devices, slot andlinked_at, that this device's
last small-state broadcast was made for.begin_small_state_broadcasttakes them andSmallStateBroadcastreturns
them asdevices, soSmallStateScheduleandSmallStateBroadcastare no longerCopy(mdk#3556). - Releasing a receipt for a group with an already-exhausted epoch gap preserves its parked state
instead of un-parking and re-parking itsHistoryNotice. - Group deletion and local wipe (
delete_group_tx,forget_group_local_data) purge
account_recovery_epoch_gapsalongside other group recovery state. - Purged all route-keyed recovery tables (including
account_recovery_staged,account_recovery_coverage*,account_recovery_units*,account_delivery_loss_evidence_routes, andaccount_recovery_copy_*) and exclusiveaccount_recovery_relaysrows on route deletion, terminaldelete_local_group_data,delete_group, andforget_group_local_data. - Pruned empty retired
account_recovery_unitsrows and aged unreferencedaccount_recovery_relaysrows inprune_recovery_coverage. - An agent item whose first event this device lacks is shown from the first edit of it this device received, not the
one with the earliestcreated_at. Any member can send such an edit and choose its timestamp, so a backdated one
could take the item from its agent. - Hardened SQLCipher open pragma ordering (
cipher_compatibilityafterPRAGMA key,busy_timeoutbefore keying),
key-package eviction watermark dominance, malformed directory profile resilience, lowercase hex canonicalization of
group_id_hexacross migration0228and all read/write boundaries, immediate WAL write transactions, media-catalog
paging and busy retries, compaction recovery and close classification, secret zeroization, saturating SQLite integer
updates, chunked stale-component deletion, secure message pruning, and atomic multi-statement OpenMLS deletes.
Security
- Enforced the local copy history floor (
join_epochandlocal_copy_install_epoch) before candidate-branch buffering and across convergence graph/pass seeding, atomically retained founding epoch anchors on group creation, and gated missing-anchor unrecoverable transitions on authenticated installed-copy lineage so unverified past-epoch headers outside a healthy group's retained history are rejected as stale instead of halting the group. - Enforced the local copy history floor (
join_epochandlocal_copy_install_epoch) before candidate-branch buffering and across convergence graph/pass seeding, atomically retained founding epoch anchors on group creation, and gated missing-anchor unrecoverable transitions on authenticated installed-copy lineage so unverified past-epoch headers outside a healthy group's retained history are rejected as stale instead of halting the group.
Release artifacts
| Track | Version to pin |
|---|---|
| Rust workspace source | v0.20.0 |
| WN Agent, gateway plugins, terminal harnesses and verified installers | wn-agent-v0.20.0 |
| MarmotKit for iOS, macOS and Android | marmotkit-v0.20.0 |
| Marmot C library and header | marmotc-v0.20.0 |
Verify the matching manifest and SHA-256 for each download and the SwiftPM checksum for Apple binary targets.
Apple wrappers also need their matching Swift source and privacy resource. See the
MarmotKit distribution guide.