Repository navigation
🤺 fix: Prefix MCP Tool Cache Write Fences #17458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+697
−31
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c4f04b1
fix: Prefix MCP tool-cache ownership fences
lia-librechat c1ff264
test: Keep fence-prefix regressions lint clean
lia-librechat 1efd6e1
fix: Preserve fence slots for literal Redis prefix braces
lia-librechat 1c9c70b
fix: Bridge MCP ownership fences across rolling upgrades
lia-librechat b346a83
fix: Isolate deployment ownership in the legacy fence bridge
lia-librechat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During a rolling upgrade, old instances still use the legacy fence key while this head uses the newly namespaced key. If an old writer's distributed lock is lost early (for example, through independent Redis eviction or deletion) while its fence remains, a new instance can claim its different fence and complete a write, after which the delayed old writer can still validate against the legacy fence and overwrite the newer catalog. Keep the legacy and new versions on a shared fencing token/key, or add a migration protocol that checks both, so mixed-version writers continue to supersede one another.
AGENTS.md reference: AGENTS.md:L45-L48
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 1c9c70b. New writers atomically claim the prefixed and exact legacy fence with one token/deadline, then validate the legacy fence when it is usable. Prefix-only ACLs fall back only after a pre-execution denial; other errors/conflicts abort. Added real Redis old→new and new→old tests with early lock deletion, stale-writer rejection, cleanup, and prefix-restricted ACL coverage. All 9 tests pass on both single-node Redis and a three-master cluster.