gabriel / musehub public
fix patch task/phase2-per-batch-commits #1 / 1
AI Agent gabriel · 118 days ago · May 10, 2026 · Diff

fix: per-batch snapshot and commit-row commits in wire_push_stream (Phase 2)

Split snapshot and commit-row INSERTs into STREAM_COMMIT_BATCH_SIZE-sized slices, each committed independently. Wraps both phases in try/except to yield ERROR frames on ConnectionDoesNotExistError instead of propagating. Adds STREAM_COMMIT_BATCH_SIZE constant and 5 Phase 2 TDD tests (P2-1..P2-5).

sha256:21eb6794362734df28b0ae9b6004b0fae0a70767d739b02bdb4ca499e2413fef sha
+49 ~14 symbols
sha256:857e2271d8cbe6f913eecdbc9e9e35152def41c1c7be931af0be0f9287138979 snapshot
+49
symbols added
~14
symbols modified
0
dead code introduced
Semantic Changes 63 symbols
+ CBATCH variable variable CBATCH L61–61
+ _collect function async_function _collect L153–157
+ _commit_pack function function _commit_pack L91–96
+ _end function function _end L99–100
+ _frames_of_type function function _frames_of_type L160–161
+ _fw variable variable _fw L59–59
+ _header function function _header L76–81
+ _make_chain function function _make_chain L134–150
+ _make_commit function function _make_commit L108–123
+ _make_object function function _make_object L103–105
+ _make_repo function async_function _make_repo L164–180
+ _make_snapshot function function _make_snapshot L126–131
+ _object_frame function function _object_frame L84–88
+ _pack function function _pack L68–69
+ _push function async_function _push L200–221
+ _stub_backend function function _stub_backend L183–197
+ _wrap function function _wrap L72–73
+ Any import import Any L37–37
+ AsyncIterator import import AsyncIterator L35–35
+ AsyncMock import import AsyncMock L38–38
+ AsyncSession import import AsyncSession L43–43
+ JSONObject import import JSONObject L57–57
+ JSONValue import import JSONValue L57–57
+ MuseWireFrameWriter import import MuseWireFrameWriter L46–46
+ SFRAME_COMMIT_PACK import import SFRAME_COMMIT_PACK L48–48
+ SFRAME_END import import SFRAME_END L48–48
+ SFRAME_ERROR import import SFRAME_ERROR L48–48
+ SFRAME_HEADER import import SFRAME_HEADER L48–48
+ SFRAME_OBJECT import import SFRAME_OBJECT L48–48
+ SFRAME_RESULT import import SFRAME_RESULT L48–48
+ STREAM_COMMIT_BATCH_SIZE import import STREAM_COMMIT_BATCH_SIZE L48–48
+ annotations import import annotations L31–31
+ blob_id import import blob_id L45–45
+ datetime import import datetime L36–36
+ db import import db L47–47
+ math import import math L33–33
+ msgpack import import msgpack L40–40
+ now_utc_iso import import now_utc_iso L45–45
+ pytest import import pytest L41–41
+ secrets import import secrets L34–34
+ select import import select L42–42
+ timezone import import timezone L36–36
+ test_p2_1_snapshot_commits_per_batch function async_function test_p2_1_snapshot_commits_per_batch L229–260
+ test_p2_2_commit_rows_committed_per_batch function async_function test_p2_2_commit_rows_committed_per_batch L268–302
+ test_p2_3_snapshot_batch_0_durable_after_batch_1_fails function async_function test_p2_3_snapshot_batch_0_durable_after_batch_1_fails L310–371
+ test_p2_4_commit_batch_0_durable_after_batch_1_fails function async_function test_p2_4_commit_batch_0_durable_after_batch_1_fails L379–448
+ test_p2_5_second_push_idempotent function async_function test_p2_5_second_push_idempotent L456–477
~ musehub/models/wire.py .py 1 symbol added
+ STREAM_COMMIT_BATCH_SIZE variable variable STREAM_COMMIT_BATCH_SIZE L404–404
← Older Oldest on task/phase2-per-batch-commits
All commits
Newer → Latest on task/phase2-per-batch-commits

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