gabriel / musehub public
feat patch wire task/grpc-only-wire #1 / 2
AI Agent gabriel · 153 days ago · Apr 23, 2026 · Diff

feat(wire): Phase 14B server-side OC-frame reassembly

- Add SFRAME_OBJECT_CHUNK constant to wire.py - Buffer incoming OC chunks in _oc_buffer; assemble when all chunks arrive - Hash-verify, polyglot-check, and store assembled objects via backend.put - Emit error frame on END if any OC sequences are incomplete - Add 9 TDD tests covering P14B-5, P14B-6, P14B-7

sha256:7b5741c91286e310b18bdae2435d6740836ac7fb4d33f31857e0181a16d6faf9 sha
+42 ~13 symbols
3 changed · 581 in snapshot files
sha256:f184ab91a7ec569defc809af8dc710f8029fc0084379795fe1504426c0a9b045 snapshot
+42
symbols added
~13
symbols modified
3
files changed
581
files in snapshot
0
dead code introduced
Semantic Changes 55 symbols
~ tests/test_wire_oc_server.py .py 40 symbols added
+ TestP14B5OneChunkOC class class TestP14B5OneChunkOC L132–194
+ test_result_ok_after_single_oc method async_method test_result_ok_after_single_oc L175–194
+ test_single_oc_chunk_stored_correctly method async_method test_single_oc_chunk_stored_correctly L134–152
+ test_single_oc_no_error_frame method async_method test_single_oc_no_error_frame L155–172
+ TestP14B6ThreeChunkOC class class TestP14B6ThreeChunkOC L201–267
+ _content_and_chunks method method _content_and_chunks L202–207
+ test_chunks_out_of_order_assembles_correctly method async_method test_chunks_out_of_order_assembles_correctly L249–267
+ test_three_chunks_no_error_frame method async_method test_three_chunks_no_error_frame L230–246
+ test_three_chunks_stored_correctly method async_method test_three_chunks_stored_correctly L210–227
+ TestP14B7PartialOCSequenceErrors class class TestP14B7PartialOCSequenceErrors L274–337
+ test_one_of_three_chunks_returns_error method async_method test_one_of_three_chunks_returns_error L276–294
+ test_partial_oc_object_not_stored method async_method test_partial_oc_object_not_stored L297–314
+ test_two_of_three_chunks_returns_error method async_method test_two_of_three_chunks_returns_error L317–337
+ _c_frame function function _c_frame L69–73
+ _collect_frames function async_function _collect_frames L80–92
+ _e_frame function function _e_frame L76–77
+ _fw variable variable _fw L32–32
+ _header_frame function function _header_frame L47–52
+ _oc_frame function function _oc_frame L55–66
+ _pack function function _pack L35–36
+ _sha256_oid function function _sha256_oid L43–44
+ _wrap function function _wrap L39–40
+ AsyncMock import import AsyncMock L15–15
+ AsyncSession import import AsyncSession L19–19
+ MagicMock import import MagicMock L15–15
+ MuseWireFrameWriter import import MuseWireFrameWriter L21–21
+ SFRAME_COMMIT_PACK import import SFRAME_COMMIT_PACK L22–22
+ SFRAME_END import import SFRAME_END L22–22
+ SFRAME_ERROR import import SFRAME_ERROR L22–22
+ SFRAME_HEADER import import SFRAME_HEADER L22–22
+ SFRAME_OBJECT_CHUNK import import SFRAME_OBJECT_CHUNK L22–22
+ SFRAME_RESULT import import SFRAME_RESULT L22–22
+ annotations import import annotations L12–12
+ grpc_frame import import grpc_frame L21–21
+ hashlib import import hashlib L14–14
+ msgpack import import msgpack L17–17
+ pytest import import pytest L18–18
+ stored_objects function function stored_objects L100–101
+ stub_backend function function stub_backend L105–114
+ stub_session function function stub_session L118–125
~ musehub/models/wire.py .py 1 symbol added
+ SFRAME_OBJECT_CHUNK variable variable SFRAME_OBJECT_CHUNK L378–378
Files Changed
+1 ~2
581 in snapshot

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