mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-11 04:00:38 +00:00
Pace-free completion framing, stray UTF-8 flush, and late-rejection guards: - Pre-encode the completion value at its validation point so send_done never re-walks a live value a mutating daemon thread could change (TOCTOU); a mutation-induced encode throw is then classified as 'exception', not a host-side worker-exit. - Budget-triggered stray flush retains an incomplete multibyte UTF-8 tail (<=3 bytes) as residual instead of decoding a legal, split character to U+FFFD in an admitted entry; the end/closeDeadline paths still full-decode. - Check 'settled' before formatting a late binding rejection's message, so a hostile message getter cannot stall or exhaust a run that already settled. - Document _check_done_value's first-to-trip ruling in its docstring. - Rewrite ProtocolChannel.send_sync around a shared write_encoded that the done frame's pre-encoded string path uses.