fix: Python SDK kg.load() silently no-oped - send the file as one atomic program - #102
Merged
Merged
Conversation
…s one program load() forwarded '.load <path>' over the wire, but the server treats .load as a client-only REPL command and replies with an informational message instead of executing anything - so SDK load() succeeded while loading nothing. Now the file is read client-side and sent as a single multi-statement execute program, which is also atomic (the server parses every statement before executing any) and immune to the per-message WS rate limit. mode= raises NotImplementedError since --replace/--merge are unimplemented server-side.
This was referenced Aug 19, 2026
Merged
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
KnowledgeGraph.load(path) forwarded '.load ' over the WebSocket, but the server treats .load as a client-only REPL command (src/protocol/handler.rs:3627-3630) and replies with an informational message instead of executing anything. So SDK load() returned success while loading nothing.
Now the file is read client-side and sent as a single multi-statement execute program:
Tests
New tests/test_kg_load.py (file contents sent verbatim as one program, mode rejected, missing file raises). Full SDK suite: 960 passed, 23 skipped.
Merge order
Independent - mergeable any time; no conflicts with #98/#100/#101/#103.