mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3034] [CLOSED] [Other] Refresh conversation-cache metrics after refused parking #4413
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#4413
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/3034
Author: @oscarlius
Created: 10/18/2026
Status: ❌ Closed
Base:
main← Head:fix/conversation-cache-pressure-metrics-20261018📝 Commits (1)
06ea882fix(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
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
e88ee39d1d6be6e3364183af3b39b62a7ed6f211(0.2.0-beta); tested candidate8d0a488f5a4ba8c06afae70f1739121345bcbab0on 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 e88ee39d1d6be6e3364183af3b39b62a7ed6f211..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.