mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3050] [CLOSED] [Other] Read conversation-cache log backlogs without dropping events #4422
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#4422
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/3050
Author: @oscarlius
Created: 10/18/2026
Status: ❌ Closed
Base:
main← Head:fix/conversation-cache-log-backlog-20261018📝 Commits (1)
e1448b3fix(serve): read cache log backlogs without dropping events📊 Changes
2 files changed (+184 additions, -15 deletions)
View changed files
📝
serve/server.py(+29 -15)➕
serve/test_cache_log_backlog.py(+155 -0)📄 Description
Problem and result
Issue #3048 can drop earlier conversation-cache events when more than one MiB arrives between monitor polls. The observer now advances through a captured end of file in bounded chunks, commits only complete lines, and retains a partial line for the next poll.
Related discussion
Fixes #3048.
Approach
serve/server.py.serve/test_cache_log_backlog.py.Validation
Rebased on upstream main
e88ee39d1d6be6e3364183af3b39b62a7ed6f211(0.2.0-beta); tested candidate90ca8acc79242e18f954e71a4c570a4ee8887f41on Windows, Python 3.14.3. Each test command starts a fresh local process.Passed:
py -3.12 -m ruff check --output-format json serve/server.py serve/test_cache_log_backlog.py(Ruff 0.2.1): 10 existing diagnostics, same as unmodified main; zero new diagnostics.python -m unittest serve.test_cache_log_backlog(7 tests);python -m unittest serve.test_monitor serve.test_server serve.test_prometheus(357 tests, 3 skipped);python -m py_compile serve/server.py;git diff --check e88ee39d1d6be6e3364183af3b39b62a7ed6f211..HEAD.Failed: Red reproduction used
git restore --source=e88ee39d1d6be6e3364183af3b39b62a7ed6f211 -- serve/server.py, thenpython -m unittest serve.test_cache_log_backlog, thengit restore --source=HEAD -- serve/server.py. The test ran 7 tests and failed 8 assertions, covering lost early events, chunk crossings, partial-line retry, and local/metricscatch-up.Not run: Native backend builds and real GPU/model tests. Only Python observer code changed. The Python 3.14.3 test environment had no Ruff; the separate Python 3.12.7 lint comparison above completed successfully.
Limits
One poll may process a large accumulated backlog; each underlying read remains bounded by
READ_MAX. Validation used local file fixtures and a local MockEngine HTTP server; it did not use a real engine or a production service.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.