Kgothatso Ngako baecb76253 test: cover the query a marmot reindex decides its work from
getResolvedMarmotGroupEventIds is what a reindex sweep subtracts from a room's
stored group events to decide what to replay, so its answer decides what work
the sweep does -- and both ways of being wrong are silent.

Report an event as resolved when it is not, and the replay skips the one event
that needed it: the message stays missing from the feed with nothing left to
trigger another attempt. Report it as unresolved when it is resolved, and every
sweep re-decrypts it forever. The whole distinction rests on `messageType NOT IN
(:unresolvedTypes)`, where those types are the two placeholder lines that stand
in for a message still to come rather than reporting one.

Covered: an event with a real line is resolved; an undecryptable outer layer and
a pending commit each leave their event unresolved, which is right because those
are precisely what a replay exists to retry. Then the subtraction itself, since
that is how the caller uses it -- three events, one settled, one holding a
placeholder, one with no line at all, and the sweep left with exactly the last
two.

Covered because the query says so and nothing else would: `marmotGroupEventId IS
NOT NULL` keeps out lines that are not about a group event -- a NIP-17 direct
message, a locally written line -- which would otherwise carry nulls into a set
the sweep subtracts with. And the room scoping, since a sweep runs per room and
another room's resolutions must not shorten its work.

Covered last, and it is the transition the sweep exists to cause: a placeholder
upserted in place into a real line resolves its event, visible through this same
query.

Two smaller ones alongside: the single-row lookups order newest first, which is
what makes them "the line for this event" rather than whichever row sqlite
reached first, and the per-sender count is scoped to its room.

Verified by mutation: defeating the messageType exclusion so placeholders count
as resolved fails five of these, including the subtraction test. The mutation
was reverted; no production source is touched by this commit.

8 tests. composeApp jvmTest is 282 tests, 0 failures.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 03:11:58 +02:00
2026-07-05 23:21:02 +02:00
2026-07-28 09:10:20 +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 thats 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 Apples 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 youre 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 IDEs 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 IDEs 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 IDEs toolbar or open the /iosApp directory in Xcode and run it from there.


Learn more about Kotlin Multiplatform

Description
Mantra as a kotlin multiplatform project
https://mantra.press
Readme 8.2 MiB
Languages
Kotlin 100%