gabriel / musehub public
fix patch main #13 / 34
AI Agent gabriel · 123 days ago · May 9, 2026 · Diff

fix: heal ghost objects in _store_batch — verify MinIO presence before skipping

_store_batch used a DB-only existence check to decide whether to PUT to MinIO. A ghost (DB row present, MinIO bytes absent) would be silently skipped on every future push, making it permanent.

Fix: call backend.exists() for each DB-present object before skipping. If storage says missing, treat it as new and issue the PUT — self-healing. Ghosts are rare in steady state so the extra HEAD requests are negligible.

Tests I5a (structural) and I5b (behavioural) pin the invariant.

sha256:6195ecc8910bbcf07ea5a8c313c3500389d907f3d687426adfdfc2c3f6c4063a sha
+2 ~1 symbols
sha256:28a49fb180be4fbdde0e924325dccce565f02b177ec150f15eeb50c35dbe8173 snapshot
+2
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 3 symbols
~ tests/test_push_object_integrity.py .py 2 symbols added
+ test_i5a_store_batch_calls_backend_exists_before_skipping function function test_i5a_store_batch_calls_backend_exists_before_skipping L331–344
+ test_i5b_ghost_in_db_is_healed_by_next_push function async_function test_i5b_ghost_in_db_is_healed_by_next_push L348–410

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