feat(wire): stream fetch/objects via msgpack-stream for TTFO improvement
Replace buffered _pack_objects_response with _stream_objects async generator using asyncio.as_completed — objects are written to the response as each R2 GET completes instead of waiting for all fetches.
Changes: - New _MSGPACK_STREAM_CT = 'application/x-msgpack-stream' content type - New _stream_objects() async generator (asyncio.as_completed, 32-worker semaphore) - fetch_objects route now returns StreamingResponse(_stream_objects(...)) - 23 new tests across 8 tiers in test_wire_object_streaming.py
sha256:93ca3b437a654dd019ba1fd795bf30877d35628eb95ace1823db9bc76a92132f
sha
+61
~1
symbols
sha256:0d42b37f3d22b912ad228f3bb8ae012a4c2acf028511e8e1cef66f98b4d0f55c
snapshot
+61
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes
62 symbols
+
test_fetch_objects_route_has_docstring
method
method test_fetch_objects_route_has_docstring L616–618
+
test_msgpack_stream_ct_constant_documented_in_module
method
method test_msgpack_stream_ct_constant_documented_in_module L620–623
+
test_empty_object_ids_returns_200_empty_body
method
async_method test_empty_object_ids_returns_200_empty_body L451–465
+
test_private_repo_unauthenticated_returns_403
method
async_method test_private_repo_unauthenticated_returns_403 L467–483
+
test_push_then_stream_fetch_roundtrip
method
async_method test_push_then_stream_fetch_roundtrip L427–449
+
test_multiple_objects_all_received
method
async_method test_multiple_objects_all_received L301–324
+
test_partial_oids_returns_only_known
method
async_method test_partial_oids_returns_only_known L326–345
+
test_each_object_has_required_keys
method
async_method test_each_object_has_required_keys L235–255
+
test_fetch_objects_returns_msgpack_stream_content_type
method
async_method test_fetch_objects_returns_msgpack_stream_content_type L216–233
+
test_object_content_matches_pushed_bytes
method
async_method test_object_content_matches_pushed_bytes L257–274
+
test_unknown_oid_produces_empty_stream
method
async_method test_unknown_oid_produces_empty_stream L276–292
+
test_corrupt_object_omitted_from_stream
method
async_method test_corrupt_object_omitted_from_stream L545–564
+
test_unauthenticated_public_repo_fetch_succeeds
method
async_method test_unauthenticated_public_repo_fetch_succeeds L582–604
+
test_stream_arrives_before_slowest_r2_fetch
method
async_method test_stream_arrives_before_slowest_r2_fetch L374–418
+
test_concatenated_msgpack_parseable_by_unpacker
method
method test_concatenated_msgpack_parseable_by_unpacker L189–196
+
test_stream_content_type_constant_value
method
method test_stream_content_type_constant_value L177–179
← Older
Oldest on task/streaming-object-fetch
All commits
Newer →
Latest on task/streaming-object-fetch
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:93ca3b437a654dd019ba1fd795bf30877d35628eb95ace1823db9bc76a92132f --body "your comment"
No comments yet. Be the first to start the discussion.