gabriel / musehub public
fix BREAKING task/domain-id-always-set #1 / 1
AI Agent gabriel · 142 days ago · May 2, 2026 · Diff

fix: persist domain_id on every repo creation path

- musehub_repository.create_repo: stores domain or 'code' in domain_id column (was always NULL) - musehub_repository.fork_repo: inherits source domain_id, falling back to 'code' for legacy NULLs - CreateRepoRequest: adds domain field so API callers can specify domain at creation time - musehub_models.MusehubRepo: column default='code' so ORM-level inserts without domain also get the right value - 7 new TDD tests covering service, fork, and API creation paths

sha256:818b6a6562e0b27cc9880802e9708fb950ce0621ec1d1d058be38b9581360af8 sha
+8 ~4 symbols
sha256:78961c9be7a41cfafd56dad9d945844905233ddf4c7d9caac3bad850577f99f1 snapshot
+8
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 12 symbols
~ musehub/db/musehub_models.py .py 1 symbol modified
~ musehub/models/musehub.py .py 1 symbol modified
~ tests/test_repository_service.py .py 8 symbols added
+ TestDomainIdAlwaysPersisted class class TestDomainIdAlwaysPersisted L1001–1162
+ test_api_create_repo_domain_stored method async_method test_api_create_repo_domain_stored L1133–1146
+ test_api_create_repo_no_domain_defaults_to_code method async_method test_api_create_repo_no_domain_defaults_to_code L1149–1162
+ test_create_repo_empty_domain_defaults_to_code method async_method test_create_repo_empty_domain_defaults_to_code L1048–1065
+ test_create_repo_explicit_domain_stored method async_method test_create_repo_explicit_domain_stored L1009–1026
+ test_create_repo_no_domain_defaults_to_code method async_method test_create_repo_no_domain_defaults_to_code L1029–1045
+ test_fork_inherits_source_domain method async_method test_fork_inherits_source_domain L1068–1095
+ test_fork_source_null_domain_becomes_code method async_method test_fork_source_null_domain_becomes_code L1098–1130
← Older Oldest on task/domain-id-always-set
All commits
Newer → Latest on task/domain-id-always-set

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