gabriel / muse public
patch task/critical1-keychain-unavailable-warning #1 / 1
AI Agent gabriel · 162 days ago · Apr 17, 2026 · Diff

security: warn when keychain unavailable and mnemonic would be silently lost (CRITICAL-1)

In save_identity(), when is_available() returns False for a non-intentional reason (no keyring backend, library missing, OS keychain broken), log a WARNING telling the operator that the BIP-39 mnemonic is ephemeral and won't survive process exit.

MUSE_KEYCHAIN_BACKEND=disabled stays silent — that's intentional CI/test mode where ephemeral mnemonics are expected.

Tests (TestKeychainUnavailableWarnsV): V1: warning is logged when keychain unavailable without the disabled flag V2: no warning when MUSE_KEYCHAIN_BACKEND=disabled (intentional mode)

sha256:6ec622eeddc8f5721ffbe2e933b7258870b47cc3e16e0cdf06684f1d36c0a5ef sha
+3 ~1 symbols
sha256:51a50756ee1e8df1e7fb65bced45f6a7b8f48d587133e5206e77f6b3b2e0dd35 snapshot
+3
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 4 symbols
~ muse/core/identity.py .py 1 symbol modified
~ tests/test_core_keychain.py .py 3 symbols added
+ TestKeychainUnavailableWarnsV class class TestKeychainUnavailableWarnsV L369–447
+ test_V1_warns_when_keychain_unavailable method method test_V1_warns_when_keychain_unavailable L385–417
+ test_V2_silent_when_keychain_intentionally_disabled method method test_V2_silent_when_keychain_intentionally_disabled L419–447
← Older Oldest on task/critical1-keychain-unavailable-warning
All commits
Newer → Latest on task/critical1-keychain-unavailable-warning

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:6ec622eeddc8f5721ffbe2e933b7258870b47cc3e16e0cdf06684f1d36c0a5ef --body "your comment"