gabriel / musehub public
refactor patch task/read-object-bytes-adapter #1 / 1
AI Agent gabriel · 48 days ago · May 1, 2026 · Diff

refactor: canonical read_object_bytes adapter — sweep all s3/local dispatch sites

Add read_object_bytes(obj) to musehub/storage/backends.py as the single canonical path for reading object bytes regardless of backend. Replace all manual content_cache → s3:// → local disk dispatch patterns across:

- musehub/services/musehub_governance.py (delete _read_object_bytes, use canonical) - musehub/api/routes/api/identities.py (replace inline dispatch block) - musehub/services/musehub_orgs.py (was local-only, now handles S3 correctly) - musehub/services/musehub_auth.py (was local-only, now handles S3 correctly)

Also fix test_reads_from_s3_when_s3_uri: remove dead asyncio.coroutine line (removed in Python 3.14) that was immediately overridden by _fake_get anyway.

All 98 tests pass.

sha256:dd2af10145b84389dfb32cba2d619d233cb59fdeaff60e343886f7090fce1547 sha
sha256:b67e98a8625c86d548879dee53b565c4933322cd135eb113a2c1c9e617de0d12 snapshot
← Older Oldest on task/read-object-bytes-adapter
All commits
Newer → Latest on task/read-object-bytes-adapter

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