mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-10 04:27:42 +08:00
OutputCollector.spillAll ran openSync/writeSync inside the stream 'data' listener with no containment. When the private per-process spill directory had been removed by a temporary-file cleaner, the first overflowing chunk threw ENOENT from Pipe.onStreamRead, became an uncaught exception in the Desktop Host, and the Electron shell reported it as a fatal failure. Spilling is best-effort by contract (spillPath is optional; a failed final close already withholds it). Every filesystem failure while opening or appending the spill file now discards the spill, reports once through the owner's logger, and leaves in-memory collection untouched. Spill inputs move into one SpillOptions object with the reporter, so tail-only collectors no longer pass an empty directory; prepareManagedProcessBinding is the explicit resolve step for the directory and reporter defaults, and the runtime and SSH helper supply their plugin loggers. Tests cover ENOENT on open (removed directory), ENOTDIR on open, and ENOSPC on append after the file exists, asserting the tail stays byte-exact, the spill file is withdrawn, and the reporter fires once.