mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
Addresses the review's two carried warnings and the comment suggestion: - Once the ledger truncates, every arm that marks it (admit()'s two ceilings and the child-marker frame arm) now clears both stray pipes' buffered output wholesale, so the end-path flushStray sees empty buffers instead of concat+decoding doomed data near a 256 MiB maxLogBytes; captureStray's newline loop re-checks the flag before re-retaining the residual. - The child runs with -u (unbuffered), so sys.__stdout__/sys.__stderr__ writes are visible to stray capture immediately; the settlement flush still drains the original std streams before the done frame as a guard. A regression test writes through sys.__stdout__/sys.__stderr__ without an explicit flush and asserts both bytes land in logs. C-ext stdio remains an accepted residual, recorded in the README Known Limitations (en + zh). - The ledger-comment arithmetic now states the exact boundary (serializes to exactly maxLogBytes; without the reserved byte it would be maxLogBytes + 1) in both host and child. Note (en + zh) registers the stray-clear and -u/settlement-drain mechanisms and the new test; pairings re-recorded; corpus passes 1029.