Files
giza-kmp/composeApp
Kgothatso NgakoandClaude Opus 5 fc80a089aa build: the Marmot engine comes from marmot-kmp (marmot-kmp, Phase 1)
quartz 1.15.2 -> 2.7.3, and the engine it used to carry from marmot 2.2.1 over mls 1.3.0
over crypto 2.1.0. docs/scripts/marmot-kmp-imports.sh --apply moved 187 lines by the rule;
42 `quartz.marmot` imports stay, which are the event classes quartz kept.

The 854 non-Marmot quartz imports came through the major bump without an edit. All 45
compile errors were in the engine seam, and 44 were one thing: five accessors that were
members of `MlsGroup` in quartz's engine are extension functions in marmot-kmp
(`currentGroupState`, `currentMarmotData`, `currentNostrGroupId`, `currentAdminIdentities`,
`isLocalAdmin`), so 14 files import one now. The 45th, `buildCurrentProfileFrom`, likewise.
No constructor the app drives changed shape, and `GroupEventResult` still has exactly nine
variants -- `MarmotEngine`'s exhaustive `when` compiling is the proof there is no tenth to
drop on the floor.

One change here is not a rename. `MlsGroupPolicy` is new in mls-kmp: quartz's engine
hardcoded Marmot's rules, mls-kmp made them an argument, and every factory defaults it to
`Permissive` -- so the eleven places this app builds a group itself were building a
non-Marmot group. The loud half is that `commitExporter` is then null, `preCommitExporterSecret`
comes back empty and `GroupEventEncryption.encrypt` refuses it ("Group key must be 32
bytes"), which is the one test that failed. The silent half matters more: `Permissive`
greases the leaf's capabilities, which MDK has never been tested against; it knows neither
`0xF2EE` nor the app-data dictionary, so RFC 9420 13.4 refuses a GroupContextExtensions
proposal in a group we are a member of; and it authorizes every commit, proposal and
SelfRemove without a check. So `MarmotGroupPolicy` goes in at all eleven. The
current-profile paths needed none -- `CurrentProfileGroupFactory` and every
`MlsGroupManager` entry point pass it themselves.

1149 tests, 0 failures; compileDebugKotlinAndroid clean; the three audits unchanged.
Import blocks were re-sorted in the touched files only: 253 further files in composeApp
have blocks that were already out of order, and C2 is the reason to leave them be.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-18 23:56:27 +02:00
..