gabriel / musehub public
feat patch identity task/identity-phase5-quorum-handles #1 / 1
AI Agent gabriel · 144 days ago · May 1, 2026 · Diff

feat(identity): Phase 5 — check_quorum resolves handle-based members via identity repo HEAD

- Add resolve_handle_to_fingerprint() to musehub_governance.py Reads identity repo HEAD IdentityRecord pubkey, computes sha256 fingerprint. Returns None when no identity repo exists or pubkey is absent. - Update check_quorum() to resolve governance members: sha256:... entries → raw fingerprint (backward compat) plain handles → resolved via identity repo HEAD pubkey - Add 8-test TDD suite: test_identity_repo_phase5.py handle resolves to fp, no-repo returns None, key-mismatch not counted, no-identity-repo not counted, fp compat, key rotation propagates, mixed member lists, 2-of-N quorum

Phase 5/5 of identity-plugin wiring (issue #19 / staging #2). Cumulative: 55 tests GREEN.

sha256:5e5b2408324a7516230e8be22aaaf9dd9b3628a61ecd3c6a9fa980ec85497508 sha
+41 ~1 symbols
sha256:7500277176d333e1abfb44251e5b253ba55e5c87add1c78053238b0f7c76636e snapshot
+41
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 42 symbols
~ tests/test_identity_repo_phase5.py .py 40 symbols added
+ _COUNTER variable variable _COUNTER L49–49
+ _KEY_A_B64 variable variable _KEY_A_B64 L37–37
+ _KEY_A_BYTES variable variable _KEY_A_BYTES L35–35
+ _KEY_A_FP variable variable _KEY_A_FP L36–36
+ _KEY_B_B64 variable variable _KEY_B_B64 L41–41
+ _KEY_B_BYTES variable variable _KEY_B_BYTES L39–39
+ _KEY_B_FP variable variable _KEY_B_FP L40–40
+ _KEY_C_B64 variable variable _KEY_C_B64 L45–45
+ _KEY_C_BYTES variable variable _KEY_C_BYTES L43–43
+ _KEY_C_FP variable variable _KEY_C_FP L44–44
+ _NOW variable variable _NOW L47–47
+ _create_identity_repo_with_pubkey function async_function _create_identity_repo_with_pubkey L136–220
+ _make_auth_key function function _make_auth_key L75–85
+ _make_identity function function _make_identity L61–72
+ _make_proposal function function _make_proposal L100–118
+ _make_repo function function _make_repo L88–97
+ _make_review function function _make_review L121–133
+ _uid function function _uid L55–58
+ AsyncSession import import AsyncSession L23–23
+ annotations import import annotations L14–14
+ base64 import import base64 L16–16
+ compute_branch_id import import compute_branch_id L25–25
+ compute_identity_id import import compute_identity_id L25–25
+ compute_proposal_id import import compute_proposal_id L25–25
+ compute_repo_id import import compute_repo_id L25–25
+ compute_review_id import import compute_review_id L25–25
+ datetime import import datetime L22–22
+ hashlib import import hashlib L17–17
+ json import import json L18–18
+ msgpack import import msgpack L20–20
+ pytest import import pytest L21–21
+ timezone import import timezone L22–22
+ test_check_quorum_fp_member_still_works function async_function test_check_quorum_fp_member_still_works L378–406
+ test_check_quorum_handle_member_counts_when_key_matches function async_function test_check_quorum_handle_member_counts_when_key_matches L266–299
+ test_check_quorum_handle_member_not_counted_when_key_differs function async_function test_check_quorum_handle_member_not_counted_when_key_differs L303–335
+ test_check_quorum_handle_with_no_identity_repo_not_counted function async_function test_check_quorum_handle_with_no_identity_repo_not_counted L339–369
+ test_check_quorum_mixed_members_both_resolve function async_function test_check_quorum_mixed_members_both_resolve L455–498
+ test_handle_member_resolves_to_fingerprint function async_function test_handle_member_resolves_to_fingerprint L229–243
+ test_handle_with_no_identity_repo_returns_none function async_function test_handle_with_no_identity_repo_returns_none L247–257
+ test_key_rotation_propagates_via_identity_repo function async_function test_key_rotation_propagates_via_identity_repo L415–446
~ musehub/services/musehub_governance.py .py 1 symbol added, 1 symbol modified
+ resolve_handle_to_fingerprint function async_function resolve_handle_to_fingerprint L60–140
← Older Oldest on task/identity-phase5-quorum-handles
All commits
Newer → Latest on task/identity-phase5-quorum-handles

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