gabriel / musehub public
refactor BREAKING task/minio-replace-local-backend #3 / 5
AI Agent gabriel · 126 days ago · May 9, 2026 · Diff

refactor: purge all local storage references — BlobBackend is the only backend

Production code: - objects.py: replace FileResponse-from-disk with BlobBackend.get() Response - musehub_sync.py: make _to_object_response async, fetch bytes from blob store - musehub_wire.py: disk_path insert no longer strips 'local://' prefix (set to '') - musehub_repository.py: remove stale disk_path docstring reference - musehub_models.py: remove 'local://…' from storage_uri lifecycle docs - config.py: update musehub_repos_dir comment (refs only, not object storage)

Deleted migration scripts (one-time, dead): - deploy/flatten_object_store.py - scripts/migrate_flat_to_per_repo.py

Deploy utilities: - deploy/count_compressed.py: remove LocalBackend isinstance branch - deploy/decompress_objects.py: remove LocalBackend isinstance branch

Documentation: - docs/pre-launch-checklist.md: remove LocalBackend/disk_path references - docs/test-coverage-checklist.md: rewrite object store and storage backends sections - GHOST_OBJECTS_INVESTIGATION.md: remove LocalBackend reference

Tests (14 files): - Replace storage_uri='local://...' with 's3://muse-objects/objects/...' - Replace disk_path=uri.replace('local://', '') with disk_path='' - Replace mock backend returning 'local://...' with 's3://...' - Fix FP4 comment in test_wire_fetch_presign.py - Fix LocalBackend address string in test_phase3_gravity_schema.py

sha256:2b1f349d777582c862b59991f2b75fc018d08142cea5a5ced394d1807769a1bc sha
+1 ~39 −29 symbols
sha256:55799cfaff1eef3565f583047cc048aa5322695ff5d1f48fd908ac2d51b3a49b snapshot
+1
symbol added
~39
symbols modified
−29
symbols removed
0
dead code introduced
Semantic Changes 69 symbols
~ deploy/flatten_object_store.py .py 10 symbols removed
flatten function function flatten L46–89
Path import import Path L33–33
annotations import import annotations L27–27
argparse import import argparse L29–29
os import import os L30–30
shutil import import shutil L31–31
sys import import sys L32–32
main function function main L124–144
parse_args function function parse_args L36–43
update_db function function update_db L92–121
~ scripts/migrate_flat_to_per_repo.py .py 16 symbols removed
REPOS_DIR variable variable REPOS_DIR L39–39
cmd_dry_run function async_function cmd_dry_run L95–118
cmd_migrate function async_function cmd_migrate L121–155
cmd_prune function async_function cmd_prune L186–217
cmd_verify function async_function cmd_verify L158–183
Path import import Path L34–34
annotations import import annotations L28–28
argparse import import argparse L30–30
asyncio import import asyncio L31–31
os import import os L32–32
sys import import sys L33–33
load_rows function async_function load_rows L42–69
main function async_function main L220–247
parse_args function function parse_args L250–259
resolve_src function function resolve_src L72–82
target_path function function target_path L85–92
~ deploy/count_compressed.py .py 1 symbol modified
~ deploy/decompress_objects.py .py 1 symbol modified
~ musehub/api/routes/musehub/objects.py .py 1 symbol added, 2 symbols removed, 1 symbol modified
FileResponse import import FileResponse L18–18
settings import import settings L23–23
+ Response import import Response L18–18
~ musehub/db/musehub_models.py .py 1 symbol modified
~ musehub/services/musehub_sync.py .py 1 symbol removed, 2 symbols modified
Path import import Path L23–23
~ tests/test_on_disk_refs.py .py 1 symbol modified
~ tests/test_wire_oc_server.py .py 1 symbol 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:2b1f349d777582c862b59991f2b75fc018d08142cea5a5ced394d1807769a1bc --body "your comment"