mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1182] [CLOSED] serve: poll cancellation during quiet prefill waits #3290
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#3290
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/1182
Author: @hulkbig
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:fix/quiet-prefill-cancel-20261006📝 Commits (1)
d4dbc34serve: poll cancellation during quiet prefill waits📊 Changes
2 files changed (+242 additions, -5 deletions)
View changed files
📝
serve/server.py(+16 -5)➕
serve/test_quiet_cancel.py(+226 -0)📄 Description
Refs #962
While the native process is quiet before its first prompt-progress line or token, the Python server can wait ten seconds before checking a client's cancellation event. Poll the pipe in waits of at most 0.5 seconds while retaining the ten-second HTTP heartbeat and existing STOP / DONE / BADM cleanup ownership.
The regression tests use real HTTP disconnects and a scripted native subprocess. They cover serial generation, batch solo generation and batch admission across the three API endpoints, streaming and non-streaming; the following request must receive its own output. Additional tests preserve heartbeat cadence and silence deadlines.
Validation on macOS arm64 / Python 3.12.12:
python -m unittest serve.test_quiet_cancel serve.test_control_cancel serve.test_parallel serve.test_restart_waiters -v— 30 tests passed.git diff HEAD^ HEAD --checkpassed.This addresses the server-side quiet wait only. Actual CUDA/HIP prefill interruption, model execution and Claude Code cancellation behavior have not been tested, so this does not claim to fully resolve #962.
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.