Files
mantra-kmp/composeApp
Kgothatso Ngako a638b1916d test(dkg): close the five gaps the per-profile keying left uncovered
Named in review of 3c8489ad and taken in order of how much they mattered.

**A ceremony finished, which nothing in the suite did.**
`TwoProfilesCompleteOneCeremonyJvmTest` runs a real three-party ChillDKG through
the manager -- Alice and Bob as two profiles in one database, Carol in her own,
the room derived to the same id on both sides rather than copied -- and asserts
the outcome the whole change exists to protect: three distinct shares, one
threshold key, and each profile resolving the group's key through its own row.
Pointing `acceptProposal` back at a row of any profile's fails both tests, and
earlier than argued: the second profile adopts the first's row, finds a host key
already on it, publishes none of its own, and the ceremony stalls two host keys
short of three for good. It does not make a bad key -- it never makes one.

**Room's migration wiring**, which a bare-connection test cannot reach.
`DkgSessionMigrationThroughRoomJvmTest` stands a v21 file up from the committed
`schemas/21.json` -- fifty-five tables is too many to restate, and the export is
what a v21 device actually holds -- then opens it through `getRoomDatabase` so
Room runs the migration and compares what it left against the entities. Its
limits are measured rather than assumed: a column dropped from the rebuilt table
fails all three tests, an index renamed fails nothing, so index names rest on the
string assertions in the sibling test and are documented as doing so.

**`DatabaseDkgRepository` with nothing open.** Five flows and `approve` had no
coverage of the branch where no profile is active -- tested for the signing
repository and not this one. `approve` publishing a host key for a profile nobody
chose is the one worth pinning.

**`getCeremonyThresholdPublicKey`**, the single read that deliberately names no
profile, now has the property it was added for: a profile holding no row of that
ceremony still gets the key, because it is the group's published result.

**Three DAO reads that no test referenced**: `getLatestSubgroupSessionFor`, whose
new profile predicate decides a refusal a user sees, plus `observeLatestSessionFor`
and `observeMessages`.

No production code changes. 1002 tests, 139 suites.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-02 20:31:37 +02:00
..