gabriel / muse public
fix BREAKING push task/wall24-single-stream-post #1 / 1
AI Agent gabriel · 151 days ago · Apr 23, 2026 · Diff

fix(push): delete batching architecture — one gRPC POST per push (Wall 24)

Phase 14 eliminated presigned R2 PUTs but left the multi-batch loop in place. That loop sent N sequential HTTPS POSTs to CF, each a separate TLS handshake. CF rate-limited pushes of large repos at ~28-32 sequential POSTs.

Fix: send all objects + commits in a single streaming HTTP/2 gRPC POST, exactly as git sends a pack file. One connection, one TLS handshake, everything streams.

Deleted: - CONN_ROTATION_INTERVAL, INTER_CLIENT_SLEEP, _BATCH_BYTE_TARGET constants - _run_batches_with_rotation() coroutine - Batching split loop (step 5) - tests/test_wire_h2_wall22.py, tests/test_wire_phase14a.py (tested deleted code)

Kept: - _make_push_ssl_ctx() for the single AsyncClient - OC-frame splitting in step 4 (handles individual objects > OC_CHUNK_SIZE)

sha256:12fcb40ef7af6294d6f1839f5556644fe32c34f2d6667ca91bec87ccd2ecc9bf sha
~1 −55 symbols
sha256:3ad7fba5300ef00fc875d8b4dd11d1d21bca524944e7a9363939b7a3026892d1 snapshot
~1
symbol modified
−55
symbols removed
0
dead code introduced
Semantic Changes 56 symbols
~ tests/test_wire_h2_wall22.py .py 26 symbols removed
TestW22A0RotationIntervalExported class class TestW22A0RotationIntervalExported L84–92
test_conn_rotation_interval_is_1 method method test_conn_rotation_interval_is_1 L90–92
test_conn_rotation_interval_is_positive_int method method test_conn_rotation_interval_is_positive_int L85–88
TestW22A1ClientRotationCount class class TestW22A1ClientRotationCount L100–167
_run_with_n_batches method method _run_with_n_batches L103–145
test_four_batches_opens_two_clients method method test_four_batches_opens_two_clients L154–157
test_nine_batches_opens_three_clients method method test_nine_batches_opens_three_clients L159–162
test_one_batch_opens_one_client method method test_one_batch_opens_one_client L147–148
test_ten_batches_opens_four_clients method method test_ten_batches_opens_four_clients L164–167
test_three_batches_opens_one_client method method test_three_batches_opens_one_client L150–152
TestW22A3FinalResult class class TestW22A3FinalResult L175–221
test_result_is_from_last_batch method method test_result_is_from_last_batch L176–221
_grpc_frame function function _grpc_frame L42–44
_make_batch function function _make_batch L75–76
_mock_client function function _mock_client L67–72
_mock_stream_response function function _mock_stream_response L52–64
_result_frame function function _result_frame L47–49
AsyncMock import import AsyncMock L29–29
MagicMock import import MagicMock L29–29
PushResult import import PushResult L34–34
annotations import import annotations L26–26
call import import call L29–29
math import import math L28–28
msgpack import import msgpack L31–31
patch import import patch L29–29
pytest import import pytest L32–32
~ tests/test_wire_phase14a.py .py 24 symbols removed
TestP14A0NoPresignForSmallObjects class class TestP14A0NoPresignForSmallObjects L70–121
_push_objects method method _push_objects L73–105
test_1kb_objects_no_presign method method test_1kb_objects_no_presign L107–110
test_290kb_objects_no_presign method method test_290kb_objects_no_presign L117–121
test_50kb_objects_no_presign method method test_50kb_objects_no_presign L112–115
TestP14A1FiveHundredSmallObjects class class TestP14A1FiveHundredSmallObjects L128–165
test_500_small_objects_no_presign_result_ok method method test_500_small_objects_no_presign_result_ok L129–165
TestP14A2HundredKBObjects class class TestP14A2HundredKBObjects L172–207
test_multiple_batches_no_presign method method test_multiple_batches_no_presign L173–207
TestP14A3BatchByteBoundary class class TestP14A3BatchByteBoundary L214–252
test_object_at_batch_boundary_goes_inline method method test_object_at_batch_boundary_goes_inline L217–252
_make_objects function function _make_objects L45–56
_mock_transport function function _mock_transport L59–63
_ok_result function function _ok_result L41–42
AsyncMock import import AsyncMock L29–29
MagicMock import import MagicMock L29–29
PushResult import import PushResult L34–34
annotations import import annotations L25–25
asyncio import import asyncio L27–27
call import import call L29–29
msgpack import import msgpack L31–31
os import import os L28–28
patch import import patch L29–29
pytest import import pytest L32–32
~ muse/cli/commands/push.py .py 5 symbols removed, 1 symbol modified
CONN_ROTATION_INTERVAL variable variable CONN_ROTATION_INTERVAL L125–125
INTER_CLIENT_SLEEP variable variable INTER_CLIENT_SLEEP L126–126
_BATCH_BYTE_TARGET variable variable _BATCH_BYTE_TARGET L132–132
_run_batches_with_rotation function async_function _run_batches_with_rotation L147–210
_time_mod import import _time_mod L138–138
← Older Oldest on task/wall24-single-stream-post
All commits
Newer → Latest on task/wall24-single-stream-post

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