Repository navigation
[PR] fix: evict watermark sessions incrementally at cache capacity - #6054
ranxianglei merged 2 commits into
Conversation
The ranxianglei#6044 fix replaced the clear-everything-at-capacity behavior with single-entry LRU eviction, but the MAX_TRACKED comment still described the old 'same hygiene' rationale without naming the new policy. One-line comment clarification; no behavioral change.
(ai: vllm-qwen/qwen3.8-27b) Duplicate screening: no duplicate. Searched open+closed issues/PRs for the same failure (watermark handshake table full-clear at the 1024-session cap): only #6044 reports it and only this PR fixes it. Related-but-distinct threads, checked:
Labels applied: Verification status (live, as of this comment):
Full structured review (regression audit vs KDD #15, hot-file coordination with #5855) follows once CI lands. |
(ai: vllm-qwen/qwen3.8-27b) Review complete — code is ready to merge. One note first: while this review was running, the branch gained ① Direction (issue check). #6044's defect is real and the fix hits the root cause, not a symptom: the capacity handler was ② Regression audit (existing behaviors of the touched paths).
③ Code. Map insertion order as the recency order is the right O(1) mechanism; delete+set on touch is correct and spec-guaranteed. The ④ Test validity. Real behavioral test with teeth: exact LRU eviction order (oldest untouched entry, not oldest ever), recency refresh pinned on all three touch points (emit/capture/learn), unknown-read non-allocation, full-table sweep ⑤/⑤b Diff & quality (external bar). 2 files, +53/−4 across two commits, every line on-purpose; no dead code, no magic numbers, no new deps, no style drift. Clean. Behavior change disclosure (old → new): at the 1024-session cap, old = admit-new clears ALL handshakes (every active session loses the fastpath for a round); new = exactly ONE least-recently-used session is evicted, and emit/capture/learn refresh recency. Intended by #6044; strictly less disruptive, self-healing within one round per KDD #15. Coordination: #5855 (v6 reland, open) still carries the old CI (live-verified just now): full matrix on head 结构化八问(中文)
判定:可合并。 CI 全绿(59 success / 0 failed),代码质量达外部贡献标准,方向正确、回归面已逐项清点。等 owner 手动合入即可;#5855 后续 rebase 时留意 pf-channel.ts 的小冲突。 |
(ai: vllm-qwen/qwen3.8-27b) Closing summary — review of this PR is complete; see the structured review comment above for the full ①–⑤b walkthrough and the Chinese 八问. What was done and the outcome:
Outcome: 判定可合并 — code meets the external-contribution bar, no regressions found across the audited behaviors. Merge stays human-only: #6054 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1146-master.d17cd58 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Problem
Admitting session 1,025 clears every existing watermark handshake.
Changes
Evict only the least recently used session and refresh recency when a known session is captured or used.
Regression coverage
A full 1,024-session table retains all but the oldest entry, refreshes recency on emit/capture/learn, and does not allocate slots for unknown reads.
Validation
Passed against exact fork commit
ffb5a3dcf0ecbf07a6d28e3db54a64bd05193fa8in an isolated GitHub Actions checkout: validation job. The targeted regression and related suites,npm run typecheck, andnpm run buildall passed on Node 22. This is targeted verification, not the full upstream CI matrix.Related work
Inspected pending protocol PRs #5652 and #5855; both leave the full-clear capacity behavior unchanged.
Closes #6044.