gabriel / musehub public
test patch task/encoding-tdd-progress #1 / 1
gabriel · 165 days ago · Apr 13, 2026 · Diff

test: add encoding roundtrip TDD suite + live progress in decompress script

- tests/test_encoding_roundtrip.py: 4 tests covering the full push→storage→serve roundtrip for zlib, delta+zlib, and encoding=None. Each test emits structured [ENCODING-TEST] log blocks with byte lengths, magic bytes, and readable flags. All 4 pass — wire_push_object_pack correctly decodes before storing.

- deploy/decompress_objects.py: replaces silent batch summaries with per-object live progress line showing N/total, %, remaining count, obj/s rate, and ETA. Also runs a COUNT query at startup so the denominator is known immediately.

sha256:ecab9b01391b6d0f175bcab08913aed319a3b6b981342bfe0333ff41d11cb41f sha
+24 ~2 symbols
sha256:dcad1c0f2081887f995349c79563995f816443b3d8018efff51db0ab56eeb1de snapshot
+24
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 26 symbols
~ tests/test_encoding_roundtrip.py .py 22 symbols added
+ _bare_hex function function _bare_hex L42–44
+ _compute_delta function function _compute_delta L56–83
+ _log_bytes function function _log_bytes L86–103
+ _mp function function _mp L47–48
+ _zlib_compress function function _zlib_compress L51–53
+ AsyncClient import import AsyncClient L28–28
+ AsyncSession import import AsyncSession L29–29
+ annotations import import annotations L19–19
+ db import import db L31–31
+ decompress_if_needed import import decompress_if_needed L32–32
+ factory_create_repo import import factory_create_repo L33–33
+ hashlib import import hashlib L21–21
+ logging import import logging L22–22
+ msgpack import import msgpack L26–26
+ pytest import import pytest L27–27
+ struct import import struct L23–23
+ zlib import import zlib L24–24
+ logger variable variable logger L35–35
+ test_delta_zlib_bare_hex_stored_as_plain_bytes function async_function test_delta_zlib_bare_hex_stored_as_plain_bytes L244–315
+ test_encoding_none_bare_hex_stored_correctly function async_function test_encoding_none_bare_hex_stored_correctly L323–369
+ test_zlib_bare_hex_blob_view_serves_plain_text function async_function test_zlib_bare_hex_blob_view_serves_plain_text L179–236
+ test_zlib_bare_hex_stored_as_plain_bytes function async_function test_zlib_bare_hex_stored_as_plain_bytes L111–171
~ deploy/decompress_objects.py .py 2 symbols added, 2 symbols modified
+ _fmt_eta function function _fmt_eta L64–69
+ time import import time L39–39
← Older Oldest on task/encoding-tdd-progress
All commits
Newer → Latest on task/encoding-tdd-progress

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