Repository navigation
Conversation
…te, not missing `_NON_DOCUMENT_KB_TYPES` listed lightrag_server, ima and kiwix but not weknora or marginnote4, although kb_types documents both as having no path on disk. Their manifest therefore fell through to `kb_dir/raw`, which never exists, and was reported as UNAVAILABLE_MISSING: the system-prompt manifest and kb_files told the model the KB "may still be under construction, or be an external folder that has moved" instead of that it is hosted elsewhere. Both types now map to UNAVAILABLE_REMOTE, like the other connected types. A parametrized test covers every connected type without local documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XAE-A-Xii
force-pushed
the
fix/kb-manifest-remote-types
branch
from
December 5, 2026 12:15
0e1fa1f to
bbe7e2c
Compare
This branch has not been deployed
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.
Description
Connected WeKnora and MarginNote 4 knowledge bases were reported as a missing folder.
_NON_DOCUMENT_KB_TYPES(deeptutor/knowledge/manifest.py) listslightrag_server,imaandkiwixbut notweknoraormarginnote4, althoughkb_types.pydocuments both as having no local documents ("No path on disk" for MarginNote 4; WeKnora "owns both indexing and document management"). Their manifest therefore fell through tokb_dir/raw, which never exists:The system-prompt manifest and
kb_filesthen tell the model: "Its document folder cannot be read right now — it may still be under construction, or be an external folder that has moved". That's wrong for a KB hosted elsewhere, and it invites the model to tell the user something is broken.Both types now map to
UNAVAILABLE_REMOTE("Hosted on a remote server; its document list cannot be read."), like the other connected types.For MarginNote 4, the library is synced from the user's MarginNote app and browsed through the MarginNote capability's own tools, so "remote" is the closest existing code, while
agent("A connected agent") would be wrong. If you'd prefer a dedicated code for it, I'm happy to add one.Related Issues
Module(s) Affected
agentsapiconfigcoreknowledgeloggingservicestoolsutilsweb(Frontend)docs(Documentation)scriptstests...Checklist
dev(notmain— see the base-branch selector above).pre-commit run --all-filesand fixed any issues.Additional Notes
tests/knowledge/test_manifest.pyaddstest_connected_kb_without_local_documents_is_remote_not_missing, parametrized over every connected type without local documents:lightrag_server,ima,kiwix,weknoraandmarginnote4. It assertsunavailable == "remote"anddocument_root(...) is None.Before the fix:
2 failed (weknora, marginnote4), 3 passed. After:The one failure (
test_indexing_run.py::test_readiness_is_local_and_cancel_requires_writable_owned_task) and the collection errors intests/knowledge/test_linked_folder_sync.pyandtests/api/test_knowledge_router.pyall needdata/user/settings/main.yaml, which only exists in a configured install. They fail the same way ondevwithout this change.The only other
document_rootcaller,multi_user/knowledge_access.py:433, already returnsNonewhen the root is missing or not a directory, so its behavior for these types is unchanged.pre-commit run --fileson both changed files passes every hook.--all-filesfailsmypyondevitself indeeptutor/services/embedding/adapters/volcengine.py, from #1015, which this PR doesn't touch.🤖 Generated with Claude Code