C1 is the constraint the whole move hangs on: ChatRoom.mlsGroupState is a MlsGroupState.encodeTls() blob written by quartz 1.15.2 on every device that has ever been in a group, and a blob the new engine cannot read costs a user every room they are in -- there is no in-place migration from a legacy group. The argument was checkable before a test was written. quartz 1.15.2's own sources, in the sources jar beside the artifact in the gradle cache, declare STATE_VERSION = 4; mls-kmp 1.3.0 declares 10 and accepts 1..10, appending only. So every blob in the wild is version 4 and the window covers it six times over. The measurement is docs/tools/old-state-blob, whose only dependency is com.vitorpamplona.quartz:quartz:1.15.2 -- it prints a real 1033-byte blob for a legacy MIP-01 group at epoch 0, which is the shape every room in the wild started as. It is checked in because once it is gone nothing in the hex says whether the fixture came from the old engine or the new one, and a fixture written by the new engine would pass while testing nothing. MlsGroupStateCompatibilityTest pins it six ways: the fixture is still version 4 (asserted alone, so a fixture that drifted to 10 cannot make the rest pass vacuously); mls-kmp decodes it; the group rebuilds from it with 0xF2EE, its nostr_group_id and its name intact, still reading as legacy; the kind:445 outer key off a restored old group is 32 bytes, which is Phase 1's policy finding pinned against real pre-migration bytes; a re-save lands on version 10 and still decodes, same group id and epoch; and RetainedEpochSecrets still round-trips the five fields RoomMlsGroupStateStore stores it as. No schema change: the blob is opaque to Room and the version is inside it, so 36 stands. Not done, and not automatable here: one manual upgrade of a profile with real rooms in it. A fixture is one member at epoch 0; the rooms that matter have epochs, members and a retained window behind them. That is the last thing between this and a release. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The old engine's state blob
A throwaway project whose only dependency is the engine the app shipped before it moved to
marmot-kmp: com.vitorpamplona.quartz:quartz:1.15.2. It prints a MlsGroupState
TLS blob, at the STATE_VERSION = 4 that version wrote, for
MlsGroupStateCompatibilityTest to decode with mls-kmp.
../../../gradlew --project-dir . -q run
It is here for provenance. The fixture in that test has to be bytes the old engine
wrote, so regenerating it with the engine the app now ships would defeat the point of the
test -- and once this project is gone there is no way to tell the difference by reading
the hex. It is not part of the root build (its own settings.gradle.kts makes it a build
of its own), and nothing in ./gradlew check runs it.
Not a general-purpose tool: it is the one blob Phase 4 of docs/marmot-kmp.md needed.