Summary
flushRawStdout() can wait indefinitely when stdout remains backpressured below the queue cap and no drain event arrives.
Context
Discovered while reviewing #452. That pull request's dashboard RPC path does not call flushRawStdout; the current caller is print-mode shutdown, so this was deferred as separate hardening.
Current Behavior
Drain waiters resolve only from the queue's drain handler. If the consumer stalls after writes stop, no further cap check occurs and the flush promise never settles or emits a diagnostic.
Desired Behavior
Define and test a bounded, loud failure policy for a permanently stalled print-mode stdout flush without weakening normal drain behavior.
Summary
flushRawStdout()can wait indefinitely when stdout remains backpressured below the queue cap and nodrainevent arrives.Context
Discovered while reviewing #452. That pull request's dashboard RPC path does not call
flushRawStdout; the current caller is print-mode shutdown, so this was deferred as separate hardening.Current Behavior
Drain waiters resolve only from the queue's drain handler. If the consumer stalls after writes stop, no further cap check occurs and the flush promise never settles or emits a diagnostic.
Desired Behavior
Define and test a bounded, loud failure policy for a permanently stalled print-mode stdout flush without weakening normal drain behavior.