You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tool witness ring expires records only for the session being written, or globally during lookupToolWitness. Native-id routing can bypass hash lookup while every completed tool call is still recorded. Finished sessions' rings and reverse-index memberships therefore remain in memory indefinitely as new sessions arrive.
Reproduction
At master 541cf26, record one witness in each new session, advance a fake clock by the 10-minute TTL plus one millisecond between sessions, and never call lookupToolWitness. _toolRingSizeForTest grows from 1 to 2 and keeps growing, despite all earlier sessions being expired. A mixed fixture also shows a dead session retained alongside a fresh session sharing the same hash.
The existing tests/tool-ring.test.ts plus two regressions produces 24 passed / 2 failed on the base.
Expected
Record-only traffic must periodically reclaim expired sessions and their hash memberships. Fresh witnesses, duplicate-hash membership, the exact TTL lookup boundary, native-id precedence and collision refusal must remain intact. The full scan should be amortized, not repeated on every tool call.
Prior work
All 3,221 upstream PRs were screened. #1692 covers per-ring capacity, duplicate hashes and lookup-time TTL. #4978 adds native tool-use-id routing. Neither reclaims abandoned hash rings during record-only traffic. Previous Afloat16 PRs #6046–#6055 are excluded.
Activity
ranxianglei commentedon Nov 12, 2026
Fixed in batch PR #6439 (merged).