gabriel / musehub public
feat BREAKING task/typing-audit #4 / 4
AI Agent gabriel · 166 days ago · Apr 12, 2026 · Diff

feat: add fork visibility, guard private repos, fix default visibility tests

- Add visibility field to ForkRepoRequest (defaults to public) - Fork source-private check raises ValueError('source_repo_private') - list_repo_forks_flat filters to public forks only - get_user_forks filters to public when viewer != owner - _guard_visibility raises 401 for unauthenticated access to private repos - Fix test_create_repo_default_visibility_is_private → public (repos default public) - Update migration constants: _HEAD=0042, _ALL_REVISIONS includes 0041+0042 - Add musehub_forks to _REQUIRED_TABLES in section36 migration tests

sha256:e883dee62e36af28206c3fb06d64a8095ecb6a5e152511dedb2454529569060d sha
+6 ~27 −5 symbols
sha256:b3de038e841c66ee8c02bc7a604731a83ff1a1caf572cb6ce062d44c36146827 snapshot
+6
symbols added
~27
symbols modified
−5
symbols removed
0
dead code introduced
Semantic Changes 38 symbols
~ musehub/models/musehub.py .py 1 symbol added, 4 symbols modified
+ Literal import import Literal L10–10
~ tests/test_migrations_section36.py .py 2 symbols added, 2 symbols removed, 3 symbols modified
− test_all_40_migrations_present method method test_all_40_migrations_present L267–270
− test_head_revision_is_0040 method method test_head_revision_is_0040 L272–292
+ test_all_42_migrations_present method method test_all_42_migrations_present L268–271
+ test_head_revision_is_0042 method method test_head_revision_is_0042 L273–293
~ _HEAD
~ tests/test_musehub_repos.py .py 1 symbol added, 1 symbol removed
− test_create_repo_default_visibility_is_private function async_function test_create_repo_default_visibility_is_private L62–73
+ test_create_repo_default_visibility_is_public function async_function test_create_repo_default_visibility_is_public L62–73
~ tests/test_storage_backends_section33.py .py 2 symbols added, 2 symbols removed, 1 symbol modified
− test_put_calls_head_then_put_when_missing method async_method test_put_calls_head_then_put_when_missing L251–255
− test_put_skips_upload_when_object_exists method async_method test_put_skips_upload_when_object_exists L257–261
+ test_put_calls_put_object_directly method async_method test_put_calls_put_object_directly L251–256
+ test_put_is_idempotent method async_method test_put_is_idempotent L258–263
~ tools/typing_audit.py .py 3 symbols modified

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