mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4479] [Engine] Decouple request cancellation and admission from blocked console output #2003
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2003
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @KeyanHu-git on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4479
Problem and result
A blocked console still stops request cancellation and HTTP admission after the lock-release fix in #2481. This follow-up covers the request lifecycle's dependency on console I/O, rather than the shared-state lock retention in #2432.
On
d227cdf6, I reproduced two cases:status_lockremains available, but the request retains the engine turn. Setting cancel does not finish the engine generator, and a second request cannot enter until output resumes.max_queue=0. The engine turn is free, but the HTTP admission reservation remains at 1. A second HTTP request returns 429. Resuming output lets the first return 200 and the reservation drop to 0.A causal control that suppresses only progress output allows generator cancellation and handover in both phases, even while later diagnostic output remains blocked.
Environment and reproduction
macOS, Python 3.12, actual Service and local HTTP server with MockEngine. The output stream blocks on an Event until explicitly resumed. No model or GPU is required for this dependency. Physical Windows QuickEdit was not exercised, and generator cleanup is not a measurement of engine-process shutdown.
Minimal reproduction: run a request long enough to reach
_progress; block its console write, set its cancel Event, and start another request without resuming output. For the admission case, setsvc.max_queue=0and block the[strata] done:write before sending the second HTTP request.Proposed scope
Separate request diagnostics from blocking console writes using one process-owned output consumer. Progress replaces stale pending progress; diagnostic messages have bounded count and byte capacity with explicit overflow accounting. Producers never wait for the sink. Engine STOP/drain and HTTP admission ownership remain unchanged. Protocol output and model tokens must not enter a lossy diagnostic queue.
Validation will cover cancellation in prompt/decode, STOP/drain ordering, HTTP completion and admission release, bounded memory/thread count under sustained backpressure, output errors, and process exit with a real full stdout pipe. This is a proposed follow-up implementation; those acceptance checks are not yet claimed to pass.
@Niko1221 commented on GitHub (Nov 5, 2026):
Hello KeyanHu-git,
Thank you for the report and for PR #2481. In Strata 0.2.11 the server's console output goes through a bounded queue, so a console that is paused or blocked (for example by a selection in the window) can no longer hold request cancellation or new requests. Testers can turn this off with
STRATA_BLOCKING_CONSOLE=1. If a request still stalls while the console window is paused on 0.2.11, please tell us the Windows terminal you use and send the last lines of the server log.The Strata project