Skip to content

feat: import restores the vectors of imported documents; import --full (#1587) - #1592

Merged
ajianaz merged 1 commit into
developfrom
feat/import-documents-1587
Oct 29, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/import-documents-1587

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

What

  • uteke import of a structural bundle (uteke export --full) now regenerates the document chunk vectors after the restore and reports chunks_reembedded. Before, documents came back with slug, title, parent and content but no chunk vectors, so semantic search could not find them.
  • uteke repair --reembed also re-embeds chunks that have no vector (chunks_missing, chunks_reembedded, chunks_failed, omitted from the JSON when zero), for the case where the backend was down during the import.
  • uteke import --full states that the input must be a bundle; any other file is an error before anything is stored. A bundle is still detected without the flag.
  • docs/cli-reference.md explains moving a whole store and the limits; CHANGELOG.

Why

#1587. Reproduced with two stores and a mock embedding endpoint: the export, the import, the hierarchy and the content already worked locally, but doc search only matched through keywords because the restored chunks had no vectors, and nothing could regenerate them.

Testing

  • cargo fmt, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked, cargo run -p docgen (no diff).
  • New core test: export from one store, import into another; hierarchy, slug, title and content match; the chunks have no vector until reembed_missing_chunks, which is idempotent; semantic search then finds the restored document. New CLI test: --full on a non-bundle fails and stores nothing.
  • Manual check with the CLI against a mock OpenAI-compatible embedder: 2 documents (112 KB each, parent and child), export, import into a fresh store, 10 chunks re-embedded, doc search returns chunk hits.
  • Not in this PR: POST /import stays JSONL-only with its 10 MB cap, so a large store moves through the files of export --full and import --full (the bundle of the manual check was 467 KB for two 112 KB documents; a 681-document workspace is far above the HTTP cap). A streaming or chunked HTTP bundle import would be a separate design.
  • Does not touch the import path of memories (Uteke::import), so the LongMemEval guard does not apply.

#1587)

A structural bundle carried chunk text but no vectors, so restored documents were invisible to semantic search. import now re-embeds the chunks, repair --reembed covers chunks, and --full requires a bundle.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 9e60128 into develop Oct 29, 2026
14 checks passed
@ajianaz
ajianaz deleted the feat/import-documents-1587 branch October 29, 2026 09:30
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