mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1046] [CLOSED] serve: a request's combined image file is deleted when the request is refused or never runs #2992
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#2992
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/1046
Author: @sergqwer
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:pr/vision-temp-files📝 Commits (1)
80c2c7fserve: a request's combined image file is deleted when the request is refused or its answer never starts📊 Changes
2 files changed (+97 additions, -6 deletions)
View changed files
📝
serve/server.py(+19 -6)📝
serve/test_server.py(+78 -0)📄 Description
Replaces #555. GitHub closed it on 2026-10-05, when my fork was made private by mistake: that took the fork out of the network for good, so it can no longer open pull requests. This is the same branch and commit (
80c2c7f), opened from a new fork; the discussion and the measurements are in #555.prepare()writes a request's pictures into onereq-<id>.svein the vision directory (~10 MB a picture), and onlyrun()'sfinallydeletes it. A request that never reachesrun()leaves the file there for good. That covers:EngineStarting(503), "no room to answer", "exceeds the context";prepare()andrun().Clients retry 503s while the engine restarts, so the temp directory grows by a file per retry.
Fix (
serve/server.py):run()takes the path over as it starts.Service.drop_embeddings(), called in the handler'sfinally, deletes a file norun()took.Tests (
VisionTempFiles): refusals for EngineStarting, no room and exceeds leave no.sve. So do, over HTTP, a 503, a 400, a client gone afterprepare(), and normal requests. Without the fix 3 and 6 files were left. Serve tests: 174 OK (7 skipped).🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.