gabriel / muse public
feat BREAKING keychain dev
AI Agent gabriel · 150 days ago · Apr 25, 2026 · Diff

feat(keychain): single global mnemonic replaces per-hub storage

One mnemonic per machine. The same BIP39 mnemonic is the root of all identity keys across every hub (localhost, staging, prod). Cross-hub replay is prevented by the host field in the MSign canonical message.

- keychain.store/load/delete: drop hub_url param; key is 'mnemonic' - load(): transparently migrates legacy '{hostname}/mnemonic' entries to the global slot by scanning identity.toml for known hostnames - identity.py: kc_store/kc_load updated to new hub-agnostic signatures - Tests: 9 new tests (I6-I8, VI1-VI6); all hub-scoped monkeypatches updated

sha256:d7b1648b47e3c68e7d1fa9c1638a323df53fa67ebee302d945cb643abc29f4e0 sha
+18 ~24 −1 symbols
sha256:29afbd9268e40783bb0462811b0dc7d05bf87467b463d2f2b205c54be28407f1 snapshot
+18
symbols added
~24
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes 43 symbols
~ muse/core/identity.py .py 2 symbols modified
~ muse/core/keychain.py .py 2 symbols added, 1 symbol removed, 3 symbols modified
_username function function _username L46–56
+ _USERNAME variable variable _USERNAME L54–54
+ _migrate_legacy_entry function function _migrate_legacy_entry L132–185
~ delete
~ load
~ store
~ tests/test_core_keychain.py .py 16 symbols added, 13 symbols modified
+ test_I6_load_is_hub_agnostic method method test_I6_load_is_hub_agnostic L192–200
+ test_I7_store_is_idempotent method method test_I7_store_is_idempotent L202–209
+ test_I8_single_keychain_entry method method test_I8_single_keychain_entry L211–225
+ TestLegacyMigrationVI class class TestLegacyMigrationVI L535–651
+ test_VI1_load_promotes_legacy_entry method method test_VI1_load_promotes_legacy_entry L550–563
+ test_VI2_migration_deletes_legacy_entry method method test_VI2_migration_deletes_legacy_entry L565–579
+ test_VI3_migration_writes_global_entry method method test_VI3_migration_writes_global_entry L581–596
+ test_VI4_migration_is_idempotent method method test_VI4_migration_is_idempotent L598–614
+ test_VI5_global_wins_over_legacy method method test_VI5_global_wins_over_legacy L616–632
+ test_VI6_two_legacy_hubs_migrate_to_one_slot method method test_VI6_two_legacy_hubs_migrate_to_one_slot L634–651
+ _GLOBAL_USERNAME variable variable _GLOBAL_USERNAME L518–518
+ _LEGACY_USERNAME_LOCALHOST variable variable _LEGACY_USERNAME_LOCALHOST L516–516
+ _LEGACY_USERNAME_STAGING variable variable _LEGACY_USERNAME_STAGING L517–517
+ _STAGING_HOSTNAME variable variable _STAGING_HOSTNAME L515–515
+ _STAGING_HUB variable variable _STAGING_HUB L514–514
+ _seed_identity_toml function function _seed_identity_toml L521–532
← Older Oldest on dev
All commits
Newer → Latest on dev

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:d7b1648b47e3c68e7d1fa9c1638a323df53fa67ebee302d945cb643abc29f4e0 --body "your comment"