gabriel / muse public
fix patch auth dev
AI Agent gabriel · 149 days ago · Apr 25, 2026 · Diff

fix(auth): run_register derives key from mnemonic, no PEM read or key_path

- Replace load_private_key(hostname) with mnemonic derivation via hd_path from the existing keygen identity entry - Remove key_path from the written identity entry - Use hd_path_for_register (already loaded) instead of re-reading with load_identity - Update tests: _setup_key now runs keygen + patches keychain instead of writing a bare PEM; assert hd_path present and key_path absent post-register - Add test_auth_register_integrity.py (R1-R4): data-integrity invariants hd_path preserved, no key_path, fingerprint matches mnemonic, round-trip works

sha256:000c6ae34bd049b98afef153e1cd959782ddcdaecab94622663435f2a4f39114 sha
+27 ~8 symbols
sha256:1af17661ecd03c8d6a15aad034afffbf5f438415a4d859d9130b56ad08167957 snapshot
+27
symbols added
~8
symbols modified
0
dead code introduced
Semantic Changes 35 symbols
~ tests/test_auth_register_integrity.py .py 26 symbols added
+ TestRegisterFingerprintMatchesMnemonic class class TestRegisterFingerprintMatchesMnemonic L147–173
+ test_R3_fingerprint_matches_mnemonic_derivation method method test_R3_fingerprint_matches_mnemonic_derivation L150–173
+ TestRegisterNoKeyPath class class TestRegisterNoKeyPath L127–144
+ test_R2_no_key_path_after_register method method test_R2_no_key_path_after_register L130–144
+ TestRegisterPreservesHdPath class class TestRegisterPreservesHdPath L106–124
+ test_R1_hd_path_present_after_register method method test_R1_hd_path_present_after_register L109–124
+ TestRegisterRoundTrip class class TestRegisterRoundTrip L176–197
+ test_R4_resolve_signing_identity_works_after_register method method test_R4_resolve_signing_identity_works_after_register L179–197
+ _FIXED_MNEMONIC variable variable _FIXED_MNEMONIC L34–37
+ _HOSTNAME variable variable _HOSTNAME L39–39
+ _HUB variable variable _HUB L38–38
+ _fake_register_response function function _fake_register_response L67–73
+ _patch_home function function _patch_home L47–55
+ _patch_keychain function function _patch_keychain L58–64
+ _run_keygen function function _run_keygen L76–81
+ _run_register function function _run_register L84–98
+ CliRunner import import CliRunner L27–27
+ MagicMock import import MagicMock L24–24
+ annotations import import annotations L20–20
+ id_module import import id_module L30–30
+ json import import json L22–22
+ kp_module import import kp_module L29–29
+ patch import import patch L24–24
+ pathlib import import pathlib L23–23
+ pytest import import pytest L26–26
+ runner variable variable runner L32–32
~ muse/cli/commands/auth.py .py 2 symbols modified
~ tests/test_cmd_auth_keygen_register.py .py 1 symbol added, 3 symbols modified
+ _FIXED_MNEMONIC variable variable _FIXED_MNEMONIC L219–222
← 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:000c6ae34bd049b98afef153e1cd959782ddcdaecab94622663435f2a4f39114 --body "your comment"