feat
patch
wire
task/wire-compression-layers
#1 / 1
feat(wire): add zstd + path-sort + delta compression to fetch stream
Layer 1: compress_and_encode() replaces zlib.compress() for O frames, using zstd when available with zlib fallback.
Layer 2: collect all batch results, sort by path before yielding O frames for deterministic order and better delta locality.
Layer 3: track path → (last_oid, raw_bytes) across batches; compute delta for successive file versions; send delta+zstd frame when profitable (delta smaller than full zstd frame), else fall back to full frame.
Also adds 7 batch-stream TDD tests (B1-B7) and 8 compression TDD tests (C1-C8) covering all three layers including cross-batch delta and empty fetch edge cases.
sha256:3aafd5d4ac38b8efcb6030fdefe87cd45d11922569e297d952358906be4d7700
sha
+80
~1
symbols
sha256:9236f8e7e87d973e843792436cabfa81d20add34c65ddc55c6ad4f093ef6b504
snapshot
+80
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes
81 symbols
+
test_all_unique_objects_sent_exactly_once
method
async_method test_all_unique_objects_sent_exactly_once L307–349
+
test_empty_want_produces_header_and_end
method
async_method test_empty_want_produces_header_and_end L398–412
+
test_all_commits_delivered_across_batches
method
async_method test_all_commits_delivered_across_batches L260–298
+
test_objects_arrive_before_their_commit
method
async_method test_objects_arrive_before_their_commit L192–221
+
test_shared_snapshot_objects_not_duplicated
method
async_method test_shared_snapshot_objects_not_duplicated L358–389
+
test_c1_server_uses_zstd_encoding
function
async_function test_c1_server_uses_zstd_encoding L178–195
+
test_c2_zstd_frame_decompresses_correctly
function
async_function test_c2_zstd_frame_decompresses_correctly L204–224
+
test_c4_successive_versions_use_delta_frame
function
async_function test_c4_successive_versions_use_delta_frame L261–298
+
test_c5_delta_frame_reconstructs_correctly
function
async_function test_c5_delta_frame_reconstructs_correctly L306–349
+
test_c6_unprofitable_delta_uses_full_frame
function
async_function test_c6_unprofitable_delta_uses_full_frame L357–389
+
test_c7_full_clone_correct_object_ids
function
async_function test_c7_full_clone_correct_object_ids L397–427
← Older
Oldest on task/wire-compression-layers
All commits
Newer →
Latest on task/wire-compression-layers
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:3aafd5d4ac38b8efcb6030fdefe87cd45d11922569e297d952358906be4d7700 --body "your comment"
No comments yet. Be the first to start the discussion.