mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3333] [Other] Refresh conversation-cache metrics after refused parking #4573
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#4573
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/3333
Author: @oscarlius
Created: 10/20/2026
Status: 🔄 Open
Base:
main← Head:fix/conversation-cache-pressure-metrics-20261018📝 Commits (1)
02e9f27fix(serve): stop reporting stale cache occupancy after refused parking📊 Changes
4 files changed (+180 additions, -0 deletions)
View changed files
📝
docs/DETAILS.md(+5 -0)📝
serve/server.py(+21 -0)📝
serve/test_monitor.py(+152 -0)📝
serve/web/app.js(+2 -0)📄 Description
Problem and result
After a refused conversation-cache park, the Monitor and
/metricscould retain a prior occupancy. This change records only the remaining count where the refusal establishes it, marks unknown bytes and cumulative evictions as unknown, and hides occupancy bars until a later authoritative event.Related discussion
Continues #3034 after the v0.2.1.4 tracker reset. The original passed the new format check, but GitHub refused to reopen the rebased branch; the reset bot explicitly suggested a new linked pull request.
Closes #3033.
Approach
Parse physical-pressure, minimum-length, and other refusal log lines in the server observer. Add regression coverage for log replay, the local loopback
/metricsendpoint, and the Monitor card. The native cache policy and inference paths are unchanged.Validation
Rebased on upstream main
9de04cd44e927a9a3df6bbc0e94fc1be8b844ba4(v0.2.1.4); tested candidate02e9f272264b8df363ddc9f3eb177d945d5d84fbon 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_monitor.py(Ruff 0.2.1): 10 existing diagnostics, same as unmodified main; zero new diagnostics.python -m unittest -v serve.test_monitor serve.test_prometheus— 24 tests passed.python -m py_compile serve/server.py serve/test_monitor.py.node --check serve/web/app.js.git diff --check 9de04cd44e927a9a3df6bbc0e94fc1be8b844ba4..HEAD.Failed:
regexdependency was installed). The fresh loopback HTTP/metricsred test then failed as expected: stale(parked, bytes)remained(1, 104857600)instead of(0, 0).Not run:
Limits
The proof covers the Python observer, local mock engine, loopback HTTP server, and Monitor JavaScript rendering. It does not measure a real engine's memory-admission behavior.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.