mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-07 04:10:42 +00:00
Addresses the review's remaining two items: - FRAME_PARSE_CAP_BYTES (64 MiB) drops an fd-3 frame whose raw length exceeds it BEFORE toString/JSON.parse: the 256 MiB wire ceiling bounds the bytes, not the decoded structure, and a compact wide frame near that ceiling could decode to far more host memory. A regression test writes a 65 MiB log frame plus a normal one and asserts the oversized frame is dropped while the trailing frame still lands in logs (fail-before: without the cap the oversized text is parsed and admitted, truncating the ledger so the trailing frame is dropped). The forged-oversized lower-bound test's frame is reduced to stay under the cap while still exercising the truncation path. - The log sink writes through the def-time bound encode+write primitives (not send_sync, whose body resolves _encode_json_plain and self.write_encoded at call time), so a rebind cannot break a log frame.