Kgothatso NgakoandClaude Opus 5 9b5e4c95fc feat(marmot): current-profile rooms, and a routing address apart from the room id (v2 Phase 4)
After this the app can create rooms on the current profile -- behind
MarmotProfile.DEFAULT_FOR_NEW_ROOMS, which stays legacy until the rollout flips
it -- and every path keyed on the `h` tag reads the room through its address.
docs/marmot-v2.md, Phase 4.

The room's id is a key. A room built around a threshold key is keyed on the id
derived from that key -- the one it signs as and every chronicle is verified
against -- and every member can compute it unaided. v2's routing component
says of `nostr_group_id` the opposite: random, never derived from any public
key, because a derivable address lets a relay link a group's traffic to the
identity behind it, which here is the key that authors the group's published
entries. Both are right about their own value, so they are two values now. A
new MarmotRouting table (schema 21 -> 22) maps an address to its room; a
current-profile room this app creates mints a random one, and every other
room -- legacy, or made by another client -- has a row whose address is its
own id, or no row at all and is addressed by its own id, which every reader
falls back to. The inbound ingest, the reindex, the negentropy answer for a
`#h` filter, the chat list's sync request and the live subscriptions all
resolve or emit addresses; LocalChatRoom carries its routings as a relation so
the subscription planner needs no query; the outbound commit, application and
Welcome templates are stamped with the room's address rather than its id.

A joiner keys a room on the group's `nostr_group_id`, which for a
current-profile room would be the address, and the creator, the joiner's own
DKG session and every chronicle know the room by its derived id. The
components carry no field for it, so it rides in the group profile's
description as one line -- `Room id: <hex>` -- the way the derivation path
already does, and MlsGroup.roomId() reads it back first. It is a claim by the
creator, exactly as the legacy `nostr_group_id` was, and is trusted no further.

MarmotGroupFactory is now the one place a group is minted. The three sites --
a direct message, the convenient room, and the derived room MarmotGroupCreation
builds -- say what the room is, and the factory decides the profile: a legacy
group is the 0xF2EE extension as before; a current-profile group is quartz's
own CurrentProfileGroupFactory with the admin policy, routing, profile and the
creator's proof-bearing leaf, and no 0xF2EE at all, because RFC 9420 requires
every member to support every GroupContext extension and an MDK leaf does not
advertise it. Creating a direct-message room reads the identity from the chat
repository, which now takes it, so the creator's leaf can carry its proof.

A peer's KeyPackage is picked by the room's profile rather than by age: a
current-profile room takes the newest current-profile package or none, since
the legacy package is deliberately the newest a peer publishes. A leaf on the
wrong profile is refused a step before the library refuses it, with a reason
the member can act on -- their package is from an older profile -- shown on
the confirmation screen and in the room's line rather than as "try again".

Tests: MarmotGroupFactoryJvmTest pins both profiles' shapes, the address
minted apart from the room id, the room id riding in the description, the
read-only creator refused on the current profile, and which leaves fit which
groups; MarmotGroupCreationJvmTest adds a current-profile room keeping its
derived id with a routing row, a legacy room unchanged, and a kind:445 under
the address filed in the room; MarmotRoomIdentityTest the description line;
LiveSubscriptionPlanTest the addresses watched. Full JVM suite: 1,166 pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 23:03:52 +02:00
2026-09-09 17:04:09 +02:00
2026-03-24 04:47:19 +02:00
2026-03-23 01:41:39 +02:00
2026-03-23 01:41:39 +02:00
2026-03-23 01:41:39 +02:00

This is a Kotlin Multiplatform project targeting Android, iOS, Desktop (JVM).

  • /composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:

    • commonMain is for code that’s common for all targets.
    • Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, the iosMain folder would be the right place for such calls. Similarly, if you want to edit the Desktop (JVM) specific part, the jvmMain folder is the appropriate location.
  • /iosApp contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.

Build and Run Android Application

To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:

  • on macOS/Linux
    ./gradlew :composeApp:assembleDebug
    
  • on Windows
    .\gradlew.bat :composeApp:assembleDebug
    

Build and Run Desktop (JVM) Application

To build and run the development version of the desktop app, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:

  • on macOS/Linux
    ./gradlew :composeApp:run
    
  • on Windows
    .\gradlew.bat :composeApp:run
    

Build and Run iOS Application

To build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.


Learn more about Kotlin Multiplatform…

Languages
Kotlin 100%