gabriel / musehub public
test wire dev
AI Agent gabriel · 154 days ago · Apr 24, 2026 · Diff

test(wire): add multi-batch push TDD suite (MB-1 through MB-5)

Invariants tested: - MB-1: non-final batch objects land in DB after request completes - MB-2: final batch succeeds when snapshot refs objects from earlier batches - MB-3: final batch fails when objects were never sent (negative baseline) - MB-4: presigned objects (pre-registered) pass final batch integrity check - MB-5: rolled-back earlier batch causes final failure (causal proof)

Also fixes MB-3 assertion to check SFRAME_ERROR ('X') not hardcoded 'E_'.

sha256:6b96a3d30e98eac26de837c69cc23f36fbfde819bb71be3802bcead96d0f4f13 sha
+39 symbols
sha256:40d6b32f773915c57233c9bc11be5cfea17435a9afe116a3153c4dc1a0bcb784 snapshot
+39
symbols added
0
dead code introduced
Semantic Changes 39 symbols
~ tests/test_wire_multibatch_push.py .py 39 symbols added
+ _collect_frames function async_function _collect_frames L125–129
+ _commit_pack_frame function function _commit_pack_frame L109–114
+ _end_frame function function _end_frame L117–122
+ _fw variable variable _fw L64–64
+ _header_frame function function _header_frame L87–96
+ _make_commit function function _make_commit L132–148
+ _make_objects function function _make_objects L206–211
+ _make_repo function async_function _make_repo L159–181
+ _make_snapshot function function _make_snapshot L151–156
+ _object_frame function function _object_frame L99–106
+ _pack function function _pack L79–80
+ _push_batch function async_function _push_batch L214–237
+ _sha256_oid function function _sha256_oid L71–72
+ _stub_r2 function function _stub_r2 L184–203
+ _utc function function _utc L75–76
+ _wrap function function _wrap L83–84
+ Any import import Any L46–46
+ AsyncMock import import AsyncMock L47–47
+ AsyncSession import import AsyncSession L52–52
+ MuseWireFrameWriter import import MuseWireFrameWriter L54–54
+ SFRAME_COMMIT_PACK import import SFRAME_COMMIT_PACK L55–55
+ SFRAME_END import import SFRAME_END L55–55
+ SFRAME_ERROR import import SFRAME_ERROR L55–55
+ SFRAME_HEADER import import SFRAME_HEADER L55–55
+ SFRAME_OBJECT import import SFRAME_OBJECT L55–55
+ SFRAME_RESULT import import SFRAME_RESULT L55–55
+ annotations import import annotations L42–42
+ datetime import import datetime L45–45
+ hashlib import import hashlib L44–44
+ msgpack import import msgpack L49–49
+ patch import import patch L47–47
+ pytest import import pytest L50–50
+ select import import select L51–51
+ timezone import import timezone L45–45
+ test_mb1_nonfinal_batch_objects_land_in_db function async_function test_mb1_nonfinal_batch_objects_land_in_db L245–278
+ test_mb2_final_batch_succeeds_with_objects_from_earlier_batches function async_function test_mb2_final_batch_succeeds_with_objects_from_earlier_batches L286–326
+ test_mb3_final_batch_fails_when_objects_never_sent function async_function test_mb3_final_batch_fails_when_objects_never_sent L334–363
+ test_mb4_presigned_objects_pass_integrity_check function async_function test_mb4_presigned_objects_pass_integrity_check L371–411
+ test_mb5_rolled_back_earlier_batch_causes_final_failure function async_function test_mb5_rolled_back_earlier_batch_causes_final_failure L419–462
← Older Oldest on dev
All commits
Newer → Latest on dev

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