mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1207] [CLOSED] fix(serve): keep cached images alive through request preparation #3311
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#3311
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/1207
Author: @hulkbig
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:review/vision-cache-lifetime-20261006📝 Commits (1)
55f48b2fix(serve): keep cached images alive through request preparation📊 Changes
3 files changed (+358 additions, -53 deletions)
View changed files
📝
serve/server.py(+76 -53)📝
serve/test_server.py(+4 -0)➕
serve/test_vision_cache.py(+278 -0)📄 Description
Address the bounded image-cache lifetime gap reported in Niko1221/Strata#1072.
Take the service FIFO before a reentrant Vision batch lock and keep both through encoding, marker expansion, validation, and the completed combined-file copy. Defer eviction until the outermost batch exits, then trim the successful raw-image cache back to 64 entries in finally. Repeated images reuse their encoding; downloads remain outside FIFO. Existing combined-file ownership is unchanged.
AI-assisted implementation and independent AI review. CPU/Python model-free verification: 9 new regression methods and 15 existing vision tests pass; 10 external protocol probes pass, including a 65-image loopback HTTP 200 response and separate-process GENI file consumption. Independent verification passes 11 methods and 20 scheduled race repetitions. Focused 24-test suite rerun before publication: passed.
Full server suite: 461 tests, 447 passed, 8 skipped, 6 errors from pre-existing missing regex imports, also observed on the base. No native CUDA/HIP inference, native C++ SVE loader, Windows, realistic embedding-volume stress, disk-full, or throughput validation. The longer FIFO hold is a correctness trade-off with unmeasured throughput cost.
The separate encoder partial-write leak remains out of scope. Review branch only, based on
82f46a8c8f.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.