Repository navigation
fix(mattermost): cap opaque target cache - #103258
Merged
steipete merged 6 commits intoJul 10, 2026
Merged
Conversation
Contributor
|
Land-ready maintainer pass complete.
Merging with contributor credit preserved. Thanks @mikasa0818. |
Contributor
|
Merged via squash.
|
This was referenced Jul 10, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 10, 2026
* fix(mattermost): cap opaque target cache * refactor(mattermost): clarify bounded target cache * chore: keep release notes in PR * chore: keep release notes in PR * refactor(mattermost): clarify bounded target cache --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
RomneyDa
pushed a commit
that referenced
this pull request
Aug 30, 2026
* fix(mattermost): cap opaque target cache * refactor(mattermost): clarify bounded target cache * chore: keep release notes in PR * chore: keep release notes in PR * refactor(mattermost): clarify bounded target cache --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 20e1368)
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.
What Problem This Solves
resolveMattermostOpaqueTarget.mattermostOpaqueTargetCachestored positive and negative results bybaseUrl::token::idin an unboundedMapwith no maximum size, eviction, or expiry.Why This Change Was Made
pruneMapToMaxSizehelper fromopenclaw/plugin-sdk/collection-runtime, whose contract preserves the newest inserted entries. Reads intentionally do not refresh recency, so this remains a simple insertion-order cache rather than introducing a new LRU abstraction.origin/mainstill has the unbounded opaque target map. This PR intentionally isolates the opaque resolution root cause and provides live HTTP proof for that path.merge-risk: availability;merge-risk: security-boundarywas considered but is not applicable because the existing SSRF policy, authentication header, token-scoped key, and network request path are unchanged.User Impact
Evidence
scripts/run-vitest.mjs; extension production and testtsgo; scopedrun-oxlint.mjs;oxfmt --check; andnode --import tsxrunning a local HTTP server while importing the real target-resolution module./api/v4/users/:idthrough the realcreateMattermostClientandfetchMattermostUserpath. After resolving 1025 unique IDs against a 1024-entry cap, the run observedrequests_after_fill=1025. A recent read of the earliest cached negative result still had1request before overflow, confirming the cache hit did not refresh insertion order. The newest ID remained cached at1request, while revisiting the earliest ID increased its request count from1to2; total requests increased to1026. This demonstrates bounded insertion-order eviction without exposing cache internals.origin/mainstill contained the unbounded map at submission-time verification, and the local HTTP proof exercised the production network path.