fix(server): enforce browse continuation point limit at capacity (#4036) - #4270
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master378 #4270 +/- ##
=============================================
- Coverage 60.19% 60.19% -0.01%
=============================================
Files 378 378
Lines 79067 79067
Branches 13838 13838
=============================================
- Hits 47598 47594 -4
- Misses 27047 27049 +2
- Partials 4422 4424 +2
🚀 New features to boost your workflow:
|
Backport of 1eb5e0c from master. Fixes an off-by-one error in browse continuation-point retention by evicting the oldest point as soon as the session reaches MaxBrowseContinuationPoints, and adds a regression test covering the exact-limit case that previously allowed one extra browse continuation point to remain active. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
marcschier
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports the browse continuation point limit fix from master (commit 1eb5e0c, PR #4036) to
master378.Problem
An off-by-one error in browse continuation-point retention allowed one extra browse continuation point to remain active. The eviction check only removed the oldest point when the count exceeded
MaxBrowseContinuationPoints, so a session could holdMaxBrowseContinuationPoints + 1points.Fix
In
Session.SaveContinuationPoint, evict the oldest point as soon as the session reaches the configured limit (>=instead of>), so at mostMaxBrowseContinuationPointspoints remain active.Tests
Adds
SessionContinuationPointsTests.SaveContinuationPointEvictsOldestWhenCountReachesConfiguredLimit, a regression test that saves one more than the configured limit and asserts the oldest point is evicted while exactly the configured number are retained. Verified it fails against the pre-fix code and passes with the fix.Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com