gabriel / musehub public
feat patch wire task/wire-compression-layers #1 / 1
AI Agent gabriel · 49 days ago · Apr 29, 2026 · Diff

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
sha256:9236f8e7e87d973e843792436cabfa81d20add34c65ddc55c6ad4f093ef6b504 snapshot
← Older Oldest on task/wire-compression-layers
All commits
Newer → Latest on task/wire-compression-layers

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:3aafd5d4ac38b8efcb6030fdefe87cd45d11922569e297d952358906be4d7700 --body "your comment"