gabriel / musehub public
perf BREAKING task/r2-presign-push #1 / 1
gabriel · 167 days ago · Apr 12, 2026 · Diff

perf: add R2 presigned upload support to MWP wire protocol

- S3Backend.presign_put / presign_get: generate boto3 presigned PUT/GET URLs for direct client→R2 uploads that bypass Cloudflare entirely - Add generate_presigned_url to _S3Client Protocol - WireConfirmObjectsRequest / WireConfirmObjectsResponse: new Pydantic models for POST /{owner}/{slug}/push/objects/confirm (Phase 3b) - WirePresignRequest.object_ids max_length raised 10_000→50_000 - wire_confirm_objects: service function that registers objects uploaded via presigned URL in musehub_objects so filter_objects skips them on future pushes — fixes the core bug where presigned uploads were re-uploaded on every push - POST /push/objects/confirm route wired up in wire.py - docs/reference/type-contracts.md regenerated

--agent-id claude-sonnet-4-6 --model-id claude-sonnet-4-6

sha256:bf1282e54c2551d1b56457d465f247676e62797fe6f3bca37b98d11edb2553dd sha
+16 ~47 symbols
sha256:aa703d0352f6b23fe16b51e104c640cfa7514fa0ae3e53394416c53f7e11da2f snapshot
+16
symbols added
~47
symbols modified
0
dead code introduced
Semantic Changes 63 symbols
~ docs/reference/type-contracts.md .md 5 symbols added, 12 symbols modified
+ py`@L3723 section MyModel — `tests/test_api_contracts_section37.py` L3723–3731
+ py`@L3732 section MyModel — `tests/test_api_contracts_section37.py` L3732–3740
+ py`@L3741 section MyModel — `tests/test_api_contracts_section37.py` L3741–3749
+ py` section WireConfirmObjectsRequest — `musehub/models/wire.py` L3421–3432
+ py` section WireConfirmObjectsResponse — `musehub/models/wire.py` L3433–3444
~ py`
~ py`
~ py`
~ musehub/api/routes/wire.py .py 3 symbols added, 15 symbols modified
+ WireConfirmObjectsRequest import import WireConfirmObjectsRequest L50–50
+ wire_confirm_objects import import wire_confirm_objects L64–64
+ push_objects_confirm function async_function push_objects_confirm L438–464
~ musehub/models/wire.py .py 2 symbols added, 1 symbol modified
+ WireConfirmObjectsRequest class class WireConfirmObjectsRequest L298–313
+ WireConfirmObjectsResponse class class WireConfirmObjectsResponse L316–320
~ musehub/services/musehub_wire.py .py 3 symbols added, 17 symbols modified
~ musehub/storage/backends.py .py 3 symbols added, 2 symbols modified
+ presign_get method async_method presign_get L406–424
+ presign_put method async_method presign_put L384–404
+ generate_presigned_url method method generate_presigned_url L55–60
← Older Oldest on task/r2-presign-push
All commits
Newer → Latest on task/r2-presign-push

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