mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
The settlement drain iterated the bound stream OBJECTS, which are not callable — every _flush() raised TypeError and was swallowed by the loop's except, so the drain never ran and only the -u flag carried the behavior. Bind sys.__stdout__.flush/sys.__stderr__.flush (bound methods, capturing the stream at binding time, immune to a later sys.__stdout__ rebind; None-guarded). Verified by removing -u temporarily: the sys.__stdout__ regression test still passes, so the drain is a genuine backstop, not a documented-but-dead layer.