mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-22 07:04:58 +00:00
* fix(core): short-circuit the flush wait when the output stream cannot flush Review follow-up on the settle flush wait: - A destroyed stream (autoDestroy after an earlier EIO/ENOSPC write error) or an already-finished one emits neither 'finish' nor 'error', and .end() on it is a silent no-op — the settle stalled for the full 10s timeout with nothing left to flush, and an abortAll() landing in that window (/clear, shutdown) would mark the entry cancelled. Short-circuit before arming the timer. writableFinished, not writableEnded: the latter is already true mid-flush. - Hoist clearTimeout into runOnce so the synchronous-throw path no longer leaves the timer armed to log a misleading flush-timeout warning for a shell that settled long ago. - Drop the vacuous duplicate-'finish' assertion (once semantics already drained the handler; the guard is pinned by the 'error' emit and the timeout test's late finish) and cover both short-circuit states with deferred-stream tests asserting the immediate transition and that .end() is never called. * test(core): pin the mid-flush wait and the throw-path timer disarm Closes the two coverage gaps from the verification review on #7905 — both mutations previously survived the full suite: - guard mutated to include writableEnded (short-circuit mid-flush, the exact truncation the flush wait prevents) — killed by a deferred stream with { writableEnded: true, writableFinished: false } asserting the transition still waits for 'finish'; - hoisted clearTimeout dropped from runOnce — killed by a throwing end() plus fake timers asserting no flush-timeout warning fires after the timeout elapses. --------- Co-authored-by: ComplexSimply <rudy.arrowsong@gmail.com> |
||
|---|---|---|
| .. | ||
| acp-bridge | ||
| audio-capture | ||
| channels | ||
| chrome-extension | ||
| cli | ||
| core | ||
| cua-driver | ||
| desktop | ||
| mobile-mcp | ||
| sdk-java | ||
| sdk-python | ||
| sdk-typescript | ||
| vscode-ide-companion | ||
| web-shell | ||
| web-templates | ||
| webui | ||
| zed-extension | ||