gabriel / musehub public
refactor BREAKING wire task/mwp-cleanup #3 / 5
AI Agent gabriel · 152 days ago · Apr 24, 2026 · Diff

refactor(wire): delete presign sidecar from MuseHub (Phase B)

The presign push path — POST /presign → N serial R2 PUTs — is the root cause of the 5-minute push. CF Worker (Phase D) replaces it. Server no longer needs to serve presign for push at all; local hub never used it (LocalBackend.presign_batch returns {}).

Deleted: - POST /{owner}/{slug}/presign route (wire.py) - presign_and_register_objects() (musehub_wire.py) - tests/test_wire_presign_integrity.py - test_mb4_presigned_objects_pass_integrity_check (test_wire_multibatch_push.py)

Updated: - T7 deleted-routes test now asserts /presign → 404 - models/wire.py: stale presign comments updated - test_wire_multibatch_push.py: MB-4 docstring removed

Storage backend presign_get/presign_put/presign_batch methods retained — they serve presigned download URLs for object fetches, unrelated to push.

sha256:a690083207d1fd8b945115cb7cc7a808009ffa99a8851df2fa1b25fcd99500c5 sha
~3 −38 symbols
sha256:06a562a721cc314cb8c9a89a3724ca3de2db996efe3eda0dfe843ed6d3f9933c snapshot
~3
symbols modified
−38
symbols removed
0
dead code introduced
Semantic Changes 41 symbols
~ tests/test_wire_presign_integrity.py .py 35 symbols removed
_collect_frames function async_function _collect_frames L115–119
_commit_pack_frame function function _commit_pack_frame L99–104
_end_frame function function _end_frame L107–112
_fw variable variable _fw L54–54
_header_frame function function _header_frame L77–86
_make_commit function function _make_commit L122–138
_make_repo function async_function _make_repo L149–178
_make_snapshot function function _make_snapshot L141–146
_object_frame function function _object_frame L89–96
_pack function function _pack L69–70
_sha256_oid function function _sha256_oid L61–62
_stub_r2_backend function function _stub_r2_backend L181–202
_utc function function _utc L65–66
_wrap function function _wrap L73–74
Any import import Any L37–37
AsyncMock import import AsyncMock L38–38
AsyncSession import import AsyncSession L43–43
MuseWireFrameWriter import import MuseWireFrameWriter L45–45
SFRAME_COMMIT_PACK import import SFRAME_COMMIT_PACK L46–46
SFRAME_END import import SFRAME_END L46–46
SFRAME_HEADER import import SFRAME_HEADER L46–46
SFRAME_OBJECT import import SFRAME_OBJECT L46–46
SFRAME_RESULT import import SFRAME_RESULT L46–46
annotations import import annotations L33–33
datetime import import datetime L36–36
func function import func L42–42
hashlib import import hashlib L35–35
msgpack import import msgpack L40–40
pytest import import pytest L41–41
select import import select L42–42
timezone import import timezone L36–36
test_pi1_presign_register_inserts_pending_row function async_function test_pi1_presign_register_inserts_pending_row L210–233
test_pi2_push_succeeds_when_presigned_object_preregistered function async_function test_pi2_push_succeeds_when_presigned_object_preregistered L241–279
test_pi3_presign_register_is_idempotent function async_function test_pi3_presign_register_is_idempotent L287–310
test_pi4_presign_register_creates_object_ref function async_function test_pi4_presign_register_creates_object_ref L318–341
~ musehub/api/routes/wire.py .py 1 symbol removed
presign_objects function async_function presign_objects L347–389
~ musehub/services/musehub_wire.py .py 1 symbol removed
presign_and_register_objects function async_function presign_and_register_objects L128–164
~ tests/test_wire_multibatch_push.py .py 1 symbol removed
test_mb4_presigned_objects_pass_integrity_check function async_function test_mb4_presigned_objects_pass_integrity_check L372–412

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