gabriel / musehub public
feat BREAKING task/hard-delete-repos #1 / 1
gabriel · 164 days ago · Apr 14, 2026 · Diff

feat: hard-delete repos — drop deleted_at, convert soft-delete to CASCADE

- Migration 0047: drop deleted_at column and ix_musehub_repos_deleted_at index - MusehubRepo ORM: remove deleted_at field - delete_repo(): session.delete() + flush() instead of UPDATE SET deleted_at - Remove all deleted_at.is_(None) query filters across services and routes - Update tests to use hard-delete patterns; drop soft-delete test cases - Update migration count/head assertions to 47

sha256:6cc6c26f84cf0c1ced2c799bbb9ad0a948a7f4eb4db795eb006e2ecb02490411 sha
+17 ~68 −15 symbols
sha256:1fe17f92e30a571c54e95c714a0d7f666202dc9147dd85490a2641df47b2a5a6 snapshot
+17
symbols added
~68
symbols modified
−15
symbols removed
0
dead code introduced
Semantic Changes 100 symbols
+ branch_labels variable variable branch_labels L23–23
+ depends_on variable variable depends_on L24–24
+ down_revision variable variable down_revision L22–22
+ downgrade function function downgrade L32–37
+ annotations import import annotations L16–16
+ op import import op L19–19
+ sa import import sa L18–18
+ revision variable variable revision L21–21
+ upgrade function function upgrade L27–29
~ musehub/api/routes/musehub/users.py .py 1 symbol removed, 4 symbols modified
− sa_update import import sa_update L25–25
~ musehub/db/musehub_models.py .py 1 symbol modified
~ tests/test_compliance.py .py 1 symbol removed, 1 symbol modified
− test_delete_soft_deletes_repos method method test_delete_soft_deletes_repos L356–359
~ tests/test_cross_repo.py .py 2 symbols removed, 1 symbol modified
− datetime import import datetime L21–21
− timezone import import timezone L21–21
~ tests/test_domains.py .py 1 symbol modified
~ tests/test_mcp_read_tools.py .py 2 symbols added, 2 symbols removed, 1 symbol modified
− test_list_repos_excludes_soft_deleted method async_method test_list_repos_excludes_soft_deleted L1293–1308
− test_list_repos_total_excludes_soft_deleted method async_method test_list_repos_total_excludes_soft_deleted L1310–1324
+ test_list_repos_excludes_deleted method async_method test_list_repos_excludes_deleted L1293–1307
+ test_list_repos_total_excludes_deleted method async_method test_list_repos_total_excludes_deleted L1309–1322
~ tests/test_migrations.py .py 2 symbols added, 2 symbols removed, 5 symbols modified
− test_all_46_migrations_present method method test_all_46_migrations_present L267–270
− test_head_revision_is_0046 method method test_head_revision_is_0046 L272–292
+ test_all_47_migrations_present method method test_all_47_migrations_present L267–270
+ test_head_revision_is_0047 method method test_head_revision_is_0047 L272–292
~ _HEAD
~ tests/test_musehub_repos.py .py 1 symbol added, 1 symbol removed
− test_delete_repo_service_sets_deleted_at function async_function test_delete_repo_service_sets_deleted_at L1402–1421
+ test_delete_repo_service_hard_deletes_row function async_function test_delete_repo_service_hard_deletes_row L1402–1422
~ tests/test_repository_service.py .py 3 symbols added, 6 symbols removed, 1 symbol modified
− test_soft_delete_hides_repo_but_preserves_db_row method async_method test_soft_delete_hides_repo_but_preserves_db_row L714–730
− TestSoftDeleteOwnerSlugRegression class class TestSoftDeleteOwnerSlugRegression L957–1046
− test_get_repo_by_owner_slug_returns_none_after_soft_delete method async_method test_get_repo_by_owner_slug_returns_none_after_soft_delete L967–984
− test_get_repo_row_by_owner_slug_returns_none_after_soft_delete method async_method test_get_repo_row_by_owner_slug_returns_none_after_soft_delete L987–1004
− test_live_repo_still_returned_after_another_is_deleted method async_method test_live_repo_still_returned_after_another_is_deleted L1007–1024
− test_owner_slug_http_returns_404_for_deleted_repo method async_method test_owner_slug_http_returns_404_for_deleted_repo L1027–1046
+ test_delete_hard_deletes_row method async_method test_delete_hard_deletes_row L714–727
+ TestDeleteOwnerSlugRegression class class TestDeleteOwnerSlugRegression L954–970
+ test_owner_slug_http_returns_404_for_deleted_repo method async_method test_owner_slug_http_returns_404_for_deleted_repo L958–970
← Older Oldest on task/hard-delete-repos
All commits
Newer → Latest on task/hard-delete-repos

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