Gap
AndroidSigningRateLimiterStorage (app/src/main/kotlin/io/privkey/keep/nip55/AndroidSigningRateLimiterStorage.kt) is the SigningRateLimiterStorage adapter the Rust persistent SigningRateLimiter calls back into for every auto-sign request. It has no test coverage for its load / save / remove / clear round-trip through KeystoreEncryptedPrefs.
The ~224 lines of Kotlin velocity logic this replaced had no Android tests either (that coverage now lives in Rust), so an encoding or persistence regression in the adapter, the exact seam that gates auto-signing, would currently ship silently.
Proposed
Add an instrumented round-trip test against a real KeystoreEncryptedPrefs (or an in-memory SharedPreferences fake) covering:
save then load returns the stored value
load of an absent key returns null
remove then load returns null
clear wipes all entries
- durability: values written via
save (now commit()) survive a fresh adapter instance
Mirrors #309 (the audit-chain FFI-seam round-trip test).
Context
Introduced by the persistent-limiter refactor (branch nip55-persistent-limiter-android, commit e40c899). Surfaced during PR review.
Gap
AndroidSigningRateLimiterStorage(app/src/main/kotlin/io/privkey/keep/nip55/AndroidSigningRateLimiterStorage.kt) is theSigningRateLimiterStorageadapter the Rust persistentSigningRateLimitercalls back into for every auto-sign request. It has no test coverage for itsload/save/remove/clearround-trip throughKeystoreEncryptedPrefs.The ~224 lines of Kotlin velocity logic this replaced had no Android tests either (that coverage now lives in Rust), so an encoding or persistence regression in the adapter, the exact seam that gates auto-signing, would currently ship silently.
Proposed
Add an instrumented round-trip test against a real
KeystoreEncryptedPrefs(or an in-memorySharedPreferencesfake) covering:savethenloadreturns the stored valueloadof an absent key returnsnullremovethenloadreturnsnullclearwipes all entriessave(nowcommit()) survive a fresh adapter instanceMirrors #309 (the audit-chain FFI-seam round-trip test).
Context
Introduced by the persistent-limiter refactor (branch
nip55-persistent-limiter-android, commit e40c899). Surfaced during PR review.