mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#3546
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/1588
Author: @nekomario28
Created: 10/8/2026
Status: ❌ Closed
Base:
main← Head:fix-1527-ready-timeout📝 Commits (1)
978f649serve: answer the request that hit the READY timeout (#1527)📊 Changes
2 files changed (+114 additions, -4 deletions)
View changed files
📝
serve/server.py(+8 -4)➕
serve/test_ready_timeout.py(+106 -0)📄 Description
Fixes #1527.
STRATA_ENGINE_READY_S(the #1317 read timeout) kills an engine that never saysREADY, but the request that was loading it ended with no response — theRuntimeErrorraised inStrataEngine.__init__matches none of the request path's handlers, so the connection closed unanswered (the reporter'scurl code=000). On a--lazyfirst start it is worse:restart()'sfinallycrashes onslot_cv, which exists only after a successful READY, so anAttributeErrormasked the failure as a 400 "the request is malformed".Changes
__init__raisesEngineDiedinstead of bareRuntimeErrorfor the start failure.EngineDiedis aRuntimeError, sorestart()'s retry loop and every existingexcept RuntimeErrorstill catch it — but the request path'sexcept EngineDiednow answers 503 "the engine did not report READY within N s …; the next request restarts it", the same shape as the mid-request silence path that already works. Covers/v1/chat/completions,/v1/messages,/v1/responsesand/v1/load.restart()'sfinallyskips theslot_cvwakeup when a lazy first start never created it — no waiters exist before the first READY anyway.Test plan
New
serve/test_ready_timeout.py(runs withpython -m unittest serve.test_ready_timeout, no GPU/model):test_ready_timeout_on_lazy_load_answers_the_request— silent fake engine, lazy load → 503 with the reason. Unfixed code: 400 malformed-request.test_ready_timeout_on_restart_answers_the_request— engine answers one request, is killed, then its restart never reports READY → 503. Unfixed code: the connection closed with no answer (RemoteDisconnected), the reported symptom.serve.test_server+serve.test_fatal_recovery+serve.test_restart_waiters+serve.test_lifecycle: 299 tests pass (3 unrelated errors —regexmodule not installed here, pre-existing).Not tested: the real engine binary; the fake engines speak the READY/GEN/DONE protocol the tests already rely on.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.