mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1183] [CLOSED] serve: release batch control after terminal native ERR #3292
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#3292
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1183
Author: @hulkbig
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:fix/terminal-native-error-1059-20261006📝 Commits (1)
25fbebdserve: release batched control after terminal native ERR (#1059)📊 Changes
2 files changed (+255 additions, -1 deletions)
View changed files
📝
serve/server.py(+10 -1)➕
serve/test_engine_errors.py(+245 -0)📄 Description
Fixes #1059
A native validation rejection emits
ERRand returns to the input loop withoutDONEorBADM. With batch control active, the Python generator's cleanup then sends STOP and waits up to 300 seconds for a terminal line that will never arrive, holding the control lock and delaying the next request.Raise a dedicated
EngineRequestError(still aValueError) for an ERR consumed by_control, and mark that command terminal before cleanup. Malformed protocol values still drain; cancellation, consumer close, fatal errors and restart cleanup retain their existing behavior. The production drain timeout is unchanged.Regression tests use real HTTP and pipes with a scripted native process. A rejection is gated until a second request is queued; both requests must finish promptly, release the control lock and reserved slot, and preserve another active slot. They also exercise the existing malformed-protocol, consumer-close and fatal-error cleanup paths.
Validation on macOS arm64 / Python 3.12.12:
python -m unittest serve.test_engine_errors serve.test_control_cancel serve.test_parallel serve.test_restart_waiters serve.test_fatal_recovery -v— 40 tests passed.git diff HEAD^ HEAD --checkpassed. The existing commit records a separate prior Linux run of 46 focused tests; its full suite retained six baseline missing-regex errors, so no full-suite pass is claimed. No GPU or real model was used.Developed, tested and reviewed with OpenAI coding assistants.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.