docs(everything): fix copy-pasted comments and JSDoc tool names - #4769
Open
simpleqt wants to merge 1 commit into
Open
docs(everything): fix copy-pasted comments and JSDoc tool names#4769simpleqt wants to merge 1 commit into
simpleqt wants to merge 1 commit into
Conversation
…ce (modelcontextprotocol#4555) createEntities, createRelations, addObservations, deleteEntities, deleteObservations, and deleteRelations each independently did load -> mutate -> save with no synchronization. Concurrent tool calls (e.g. multiple mutations dispatched from one LLM turn) could race: both read the same starting state, both write back their own copy, and whichever write landed last silently discarded the other's changes. Interleaved writes could also corrupt the file outright. Adds an in-process async mutex (KnowledgeGraphManager.withLock) that serializes all six mutation methods through a single queue. Read-only methods (readGraph, searchNodes, openNodes) are unaffected. Verified: reverting the fix and re-running the new concurrency tests reproduces the bug exactly (lost entities, lost relations, malformed JSONL lines). With the fix, all 39 tests pass. Fixes modelcontextprotocol#1819 Co-authored-by: olaservo <olahungerford@gmail.com>
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.
Small comment/JSDoc fixes in the everything server:
get-resource-links.ts: JSDoc said it registers the 'get-resource-reference' tool — copy-paste from the neighboring tool file; it registersget-resource-linkstrigger-long-running-operation.ts: JSDoc said 'trigger-tong-running-operation' → 'trigger-long-running-operation'resources/subscriptions.ts: the UnsubscribeRequestSchema handler's comments said 'Get the URI to subscribe to' / 'Acknowledge the subscribe request' — copy-paste from the subscribe handler; now say unsubscribeserver/logging.ts: alert message pattern 'Alert level-message' → 'Alert-level message' (matches the seven sibling levels)tools/get-roots-list.ts: 'rootsFetch the current roots list' — merged words from a bad editComments/JSDoc only; no behavior change.