Files
mantra-kmp/composeApp
Kgothatso Ngako 9e6aa382af test(identity): the restore round trip, and that no node ran
Phase 7 of docs/nsec-sign-in.md. Phases 2 through 6 each pin one seam; this is
the seams in a row, with the network faked at the repository.

NsecRestoreRoundTripJvmTest unlocks the jvm key store into a temporary
directory, writes an nsec the way the sign-in screen's commit does, lists
identities the way startup does (both stores, merged) and asserts the key is
listed under the id the writer returned, builds the Identity the startup
screen's NostrSecret branch builds -- business = null -- and hands
NavigationViewModel a device holding the placeholder account the sign-in
planted. It must land on UnqueuedProfileSynchronization: fetch, do not
create. Then the device's account gains an indexed kind 0, as the rows would
when the relays answer, and the same observer must move to ProfileLoaded.

And the assertion nothing in the UI would reveal: no Lightning node ran. The
identity has no business behind it, and the jvm BusinessManager's flow of
running businesses is empty afterwards. An nsec identity that quietly
started a node -- Electrum, the LSP peer, the watchers -- would be a bug
with no visible symptom, which is why it is asserted here rather than
noticed later.

The device fake holds its account in a MutableStateFlow rather than a
flowOf, so the second step is the observer seeing a change, as it would in
the app, not a second call.

Verified with :composeApp:compileDebugKotlinAndroid, :composeApp:jvmTest (902
tests) and :composeApp:m3Audit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pulled-From: curated/curated@647ee815c1
2026-09-13 12:00:19 +02:00
..