Symptom

After writing a peer certificate to disk, the fetchCert path returned true and continued as if TLS was ready — even when the trust store reload loaded zero certificates (e.g., the file was corrupt or the trust dir was empty). No warning appeared at the call site, only deep in HttpClientProvider.rebuild().

Root cause

HttpClientProvider.rebuild() called trustManager.reload() (which already returned a loaded count) but returned Unit, discarding the count. The rebuildHttpClient() wrapper propagated the same opaque Unit. Callers in HttpClient.jvm.kt and HttpClient.android.kt had no signal to detect a failed reload after writing a cert.

Additionally, KrillAppMeta.kt’s is MenuCommand -> ServerMetaData() catch-all fired silently when .meta() was called on an SSE-discriminator type — with no log, making it invisible at runtime.

Fix

Prevention