MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / fake_index_dedup

Method fake_index_dedup

tests/test_add_command.py:165–167  ·  view source on GitHub ↗
(raw_path, kb_dir_arg, doc_name=None)

Source from the content-addressed store, hash-verified

163 existing_blob.write_bytes(b"pre-existing-do-not-delete")
164
165 def fake_index_dedup(raw_path, kb_dir_arg, doc_name=None):
166 # Dedup hit: return the existing doc_id, create NO new blob.
167 return IndexResult(doc_id=existing_id, description="", tree={"structure": []})
168
169 doc = tmp_path / "dup.pdf"
170 doc.write_bytes(b"%PDF-1.4 dup")

Callers

nothing calls this directly

Calls 1

IndexResultClass · 0.90

Tested by

no test coverage detected