gabriel / musehub public
chore minor dev
gabriel · 164 days ago · Apr 13, 2026 · Diff

chore: add decompress_objects.py backfill script

One-time migration to repair objects stored zlib-compressed by the old wire path. Reads all s3:// objects, decompresses any with zlib magic bytes (after verifying SHA-256 still matches), re-uploads plain bytes.

Idempotent: plain objects are skipped. Hash-mismatch objects are logged and skipped without modification.

sha256:e6896bcd3e13d774000d19517a0cc7bb05c7466f2893dbd89b7828459ede7dc0 sha
+18 symbols
sha256:04bb11bb7d94a38de02c9b10197625c15d4f1cc82dcbd824f5aadcbc749a1669 snapshot
+18
symbols added
0
dead code introduced
Semantic Changes 18 symbols
~ deploy/decompress_objects.py .py 18 symbols added
+ _ZLIB_MAGIC variable variable _ZLIB_MAGIC L48–48
+ _decompress function function _decompress L55–59
+ _is_zlib function function _is_zlib L51–52
+ backfill function async_function backfill L62–187
+ AsyncSession import import AsyncSession L41–41
+ annotations import import annotations L32–32
+ argparse import import argparse L34–34
+ asyncio import import asyncio L35–35
+ create_async_engine import import create_async_engine L41–41
+ db import import db L45–45
+ get_backend import import get_backend L46–46
+ hashlib import import hashlib L36–36
+ sa import import sa L40–40
+ sessionmaker import import sessionmaker L42–42
+ settings import import settings L44–44
+ sys import import sys L37–37
+ zlib import import zlib L38–38
+ main function function main L190–208
← Older Oldest on dev
All commits
Newer → Latest on dev

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