Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

fix(storage): exclude zero-byte files from index expectations (#3904)

Onefly10fd775ac1e3
diff --git a/openviking/storage/index_consistency.py b/openviking/storage/index_consistency.py
index f056e585a..dbac98003 100644
--- a/openviking/storage/index_consistency.py
+++ b/openviking/storage/index_consistency.py
@@ -135,6 +135,9 @@ def _file_candidates(
for entry in entries:
if entry.get("isDir"):
continue
+ size = entry.get("size")
+ if isinstance(size, int) and not isinstance(size, bool) and size == 0:
+ continue
uri = _entry_uri(root_uri, entry)
if not _is_index_scope(uri):
continue