gabriel / musehub public
test BREAKING phase1 task/phase1-object-store-invariant #6 / 6
AI Agent gabriel · 103 days ago · May 29, 2026 · Diff

test(phase1): failing tests + DB schema for object store invariant (issue #63)

14 RED tests covering all commit and snapshot write sites: - merge_proposal: merge commit + merged snapshot - create_repo(initialize): init commit - commit_files_to_repo: commit + snapshot - upsert_snapshot_entries: snapshot (push receive path)

Each test asserts backend.exists(id) and muse binary format (commit/snapshot <size>\0<json>). Also adds storage_uri column to MusehubCommit and MusehubSnapshot + alembic migration 0068.

sha256:e3296c39859814a0ae8b688be26ec1a24b3895fec467d9bdaefb7431e5ae3a93 sha
+47 ~2 symbols
sha256:a3c222e18d273a40a22c51f4d28236ba6503bc3d6f2d34fb90e91b8734b353fe snapshot
+47
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 49 symbols
+ branch_labels variable variable branch_labels L18–18
+ depends_on variable variable depends_on L19–19
+ down_revision variable variable down_revision L17–17
+ downgrade function function downgrade L33–35
+ annotations import import annotations L11–11
+ op import import op L14–14
+ sa import import sa L13–13
+ revision variable variable revision L16–16
+ upgrade function function upgrade L22–30
+ TestCommitFilesToRepoObjectStore class class TestCommitFilesToRepoObjectStore L316–406
+ test_commit_is_muse_binary_format method async_method test_commit_is_muse_binary_format L362–382
+ test_commit_written_to_object_store method async_method test_commit_written_to_object_store L317–336
+ test_snapshot_is_muse_binary_format method async_method test_snapshot_is_muse_binary_format L384–406
+ test_snapshot_written_to_object_store method async_method test_snapshot_written_to_object_store L338–360
+ TestMergeProposalObjectStore class class TestMergeProposalObjectStore L105–248
+ test_merge_commit_object_is_muse_binary_format method async_method test_merge_commit_object_is_muse_binary_format L129–150
+ test_merge_commit_storage_uri_populated method async_method test_merge_commit_storage_uri_populated L205–225
+ test_merge_commit_written_to_object_store method async_method test_merge_commit_written_to_object_store L106–127
+ test_merged_snapshot_is_muse_binary_format method async_method test_merged_snapshot_is_muse_binary_format L179–203
+ test_merged_snapshot_storage_uri_populated method async_method test_merged_snapshot_storage_uri_populated L227–248
+ test_merged_snapshot_written_to_object_store method async_method test_merged_snapshot_written_to_object_store L152–177
+ TestRepoInitObjectStore class class TestRepoInitObjectStore L255–309
+ test_init_commit_is_muse_binary_format method async_method test_init_commit_is_muse_binary_format L284–309
+ test_init_commit_written_to_object_store method async_method test_init_commit_written_to_object_store L256–282
+ TestUpsertSnapshotObjectStore class class TestUpsertSnapshotObjectStore L413–451
+ test_snapshot_is_muse_binary_format method async_method test_snapshot_is_muse_binary_format L432–451
+ test_snapshot_written_to_object_store method async_method test_snapshot_written_to_object_store L414–430
+ _backend function function _backend L88–90
+ _decode_header function function _decode_header L93–98
+ _make_branch_with_commit function async_function _make_branch_with_commit L64–85
+ _make_repo function async_function _make_repo L46–61
+ _uid function function _uid L41–43
+ AsyncSession import import AsyncSession L23–23
+ MusehubBranch import import MusehubBranch L27–27
+ MusehubCommit import import MusehubCommit L27–27
+ MusehubCommitRef import import MusehubCommitRef L27–27
+ MusehubRepo import import MusehubRepo L27–27
+ MusehubSnapshot import import MusehubSnapshot L27–27
+ MusehubSnapshotRef import import MusehubSnapshotRef L27–27
+ annotations import import annotations L18–18
+ blob_id import import blob_id L25–25
+ compute_identity_id import import compute_identity_id L26–26
+ compute_repo_id import import compute_repo_id L26–26
+ datetime import import datetime L21–21
+ fake_id import import fake_id L25–25
+ json import import json L20–20
+ pytest import import pytest L22–22

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