feat: add pack-based object upload endpoint (POST /push/object-pack)
Replace N per-object TLS round-trips with M = ceil(N/1000) batched POSTs. For a 7 000-object push this is 7 requests instead of 7 000 connections.
Server changes: - WireObjectPackRequest / WireObjectPackResponse added to models/wire.py with PACK_MAX_OBJECTS=1_000 and PACK_MAX_BYTES=50_000_000 DoS limits. model_validator enforces total-byte budget before any storage write. - wire_push_object_pack() in services/musehub_wire.py: same auth/hash/ storage/DB pattern as wire_push_objects but accepts a full pack of objects in one msgpack POST. Bulk IN existence check, parallel asyncio storage puts, and a single bulk pg_insert on_conflict_do_nothing. - POST /{owner}/{slug}/push/object-pack route registered in api/routes/wire.py with the standard WIRE_PUSH_LIMIT rate limiter. - 10 new tests in tests/test_wire_protocol.py: happy path, idempotency, mixed new/existing, hash integrity, auth, non-owner rejection, count DoS limit, total-size DoS limit, collaborator auth, path traversal. All 99 wire protocol tests green. - docs/reference/type-contracts.md updated with the two new models.
0 comments
muse hub commit comment sha256:dfa20cd4754ee9450bdf275ec73b78f137dae8f8076a7ac27595d3c828ac42d3 --body "your comment"
No comments yet. Be the first to start the discussion.