feat
patch
phase5
task/phase1-object-store-invariant
#2 / 6
feat(phase5): backfill script + tests for object store invariant (issue #63)
deploy/backfill_object_store.py pages through all MusehubCommit and MusehubSnapshot rows where storage_uri IS NULL and writes canonical muse binary objects to S3: - commit <size>\0<json> for each commit - snapshot <size>\0<json> for each snapshot (full manifest or reconstructed from delta chain via _reconstruct_manifest)
Fully idempotent — rows with storage_uri already set are skipped. Returns BackfillStats with written/skipped/errors counts. Supports --dry-run and --batch flags for production use.
10 tests covering: commit backfill, snapshot backfill, delta-only snapshot reconstruction, idempotency, and stats accuracy.
148 total tests GREEN.
sha256:6191353352f5187f4dc208220e243f3cf703ac322cad8018775716e9d21bce86
sha
+53
symbols
sha256:8acb06b900d9df767c61725a34978bea8e655dd34a029d219d305811fff99422
snapshot
+53
symbols added
0
dead code introduced
Semantic Changes
53 symbols
+
test_backfill_skips_commits_already_in_s3
method
async_method test_backfill_skips_commits_already_in_s3 L131–148
+
test_commit_s3_bytes_are_muse_binary_format
method
async_method test_commit_s3_bytes_are_muse_binary_format L109–129
+
test_commit_storage_uri_populated_after_backfill
method
async_method test_commit_storage_uri_populated_after_backfill L91–107
+
test_backfill_skips_snapshots_already_in_s3
method
async_method test_backfill_skips_snapshots_already_in_s3 L259–277
+
test_snapshot_delta_only_reconstructed_and_backfilled
method
async_method test_snapshot_delta_only_reconstructed_and_backfilled L216–257
+
test_snapshot_manifest_correct_after_backfill
method
async_method test_snapshot_manifest_correct_after_backfill L197–214
+
test_snapshot_s3_bytes_are_muse_binary_format
method
async_method test_snapshot_s3_bytes_are_muse_binary_format L174–195
+
test_snapshot_storage_uri_populated_after_backfill
method
async_method test_snapshot_storage_uri_populated_after_backfill L156–172
+
test_idempotent_second_run_writes_nothing
method
async_method test_idempotent_second_run_writes_nothing L294–314
+
test_stats_zero_when_nothing_to_backfill
method
async_method test_stats_zero_when_nothing_to_backfill L285–292
Older
feat(phase4): wire fetch serves commits and snapshots from S3 (i…
sha256:9d0ffea20e344782dc6a969d4a240b3d7c96392b5dc03bbd9421890cb78c6f19
All commits
Newer
feat(phase6): remove delta_blob path, dead imports, add fallback…
sha256:e35be48854f182f7bf02dc6cc0f58d22b3de3a544b570c0e2bc53f9e75a3607d
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:6191353352f5187f4dc208220e243f3cf703ac322cad8018775716e9d21bce86 --body "your comment"
No comments yet. Be the first to start the discussion.