FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Python SDK kg.load() silently no-oped - send the file as one atomic program by jsam · Pull Request #102 · inputlayer/inputlayer · GitHub

fix: Python SDK kg.load() silently no-oped - send the file as one atomic program - #102

Merged
jsam merged 1 commit into
mainfrom
py/fix-kg-load
Aug 20, 2026
Merged

fix: Python SDK kg.load() silently no-oped - send the file as one atomic program#102
jsam merged 1 commit into
mainfrom
py/fix-kg-load

Conversation

jsam commented Aug 19, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

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:

  • Atomic: the server parses every statement before executing any, so a broken file loads nothing rather than half.
  • Rate-limit-safe: one WS message instead of one per statement, which is exactly how the il CLI (feat: il CLI - install ontologies from the registry over WS #98) deploys ontology packs.
  • mode= now raises NotImplementedError (--replace/--merge are unimplemented server-side; previously they were silently dropped).

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.

…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.
jsam changed the title fix: Python SDK kg.load() silently no-oped — send the file as one atomic program fix: Python SDK kg.load() silently no-oped - send the file as one atomic program Aug 19, 2026
jsam merged commit b7096c2 into main Aug 20, 2026
11 checks passed
jsam deleted the py/fix-kg-load branch August 20, 2026 12:26
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL