gabriel / musehub public
feat BREAKING dev
AI Agent gabriel · 130 days ago · May 7, 2026 · Diff

feat: separate identity_type from is_admin; fix profile repo count

- Add is_admin boolean column to musehub_identities (default False) - Add CHECK constraint: identity_type IN ('human', 'agent', 'org') - Migration 0042: add column, fix stale admin rows, add constraint - MSignContext.is_admin now reads identity.is_admin column, not identity_type=='admin' - VerifyRequest already rejects non-{human,agent} types; documented clearly - Fix test_domains.py admin_user fixture: identity_type=human + is_admin=True - Fix ui_user_profile.py: repo_count excludes private repos - Add test_identity_admin_separation.py (11 tests, all green) - Add test for profile repo_count visibility filter

sha256:e1a17c43a28bf3c5d59a770c8734064ea0444dd1bd47c98b221e27a2c13324e4 sha
+30 ~4 symbols
sha256:91dbdd3c0306f63e9354b62c8257a9238c6627ce7b5571afd2223597ef1a559a snapshot
+30
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 34 symbols
+ branch_labels variable variable branch_labels L22–22
+ depends_on variable variable depends_on L23–23
+ down_revision variable variable down_revision L21–21
+ downgrade function function downgrade L57–69
+ annotations import import annotations L14–14
+ op import import op L16–16
+ sa import import sa L17–17
+ revision variable variable revision L20–20
+ upgrade function function upgrade L26–54
+ _make_identity function function _make_identity L50–62
+ AsyncClient import import AsyncClient L36–36
+ AsyncSession import import AsyncSession L37–37
+ MSignContext import import MSignContext L39–39
+ MusehubDomain import import MusehubDomain L41–41
+ MusehubIdentity import import MusehubIdentity L40–40
+ annotations import import annotations L33–33
+ app import import app L42–42
+ pytest import import pytest L35–35
+ require_signed_request import import require_signed_request L43–43
+ test_r1_valid_self_registration_identity_types_accepted function function test_r1_valid_self_registration_identity_types_accepted L172–184
+ test_r2_admin_identity_type_rejected_by_verify_request function function test_r2_admin_identity_type_rejected_by_verify_request L191–210
+ test_r2_arbitrary_identity_type_rejected function function test_r2_arbitrary_identity_type_rejected L213–224
+ test_r3_is_admin_column_exists_on_orm_model function function test_r3_is_admin_column_exists_on_orm_model L69–78
+ test_r3_is_admin_defaults_false function function test_r3_is_admin_defaults_false L81–88
+ test_r4_human_identity_type_without_is_admin_flag_is_not_admin function function test_r4_human_identity_type_without_is_admin_flag_is_not_admin L119–134
+ test_r4_msign_context_is_admin_from_column function function test_r4_msign_context_is_admin_from_column L95–116
+ test_r5_identity_type_admin_string_does_not_grant_is_admin function function test_r5_identity_type_admin_string_does_not_grant_is_admin L141–164
+ test_r6_human_with_is_admin_true_can_verify_domain function async_function test_r6_human_with_is_admin_true_can_verify_domain L232–265
+ test_r7_human_with_is_admin_false_cannot_verify_domain function async_function test_r7_human_with_is_admin_false_cannot_verify_domain L273–297
~ musehub/db/musehub_models.py .py 1 symbol modified
~ tests/test_domains.py .py 1 symbol modified
+ test_profile_header_repo_count_excludes_private function async_function test_profile_header_repo_count_excludes_private L592–633
← 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:e1a17c43a28bf3c5d59a770c8734064ea0444dd1bd47c98b221e27a2c13324e4 --body "your comment"