Skip to content

fix: reindex embeddings after config drift#270

Open
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/pipeline-auto-reindex
Open

fix: reindex embeddings after config drift#270
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/pipeline-auto-reindex

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wire store init reindex detection to reindexAll() when embedding provider/model/dimensions drift is reported.
  • Run reindex in initStores() so both live TdaiCore and shared createPipeline/seed paths refresh existing L1/L0 vectors.
  • Clear the returned reindex flag after a successful reindex and log progress/completion.

Root cause

VectorStore.init() already returns needsReindex after recreating vec tables, but the shared store initialization path did not execute reindexAll(), so historical records could remain without fresh vectors after embedding config drift.

Tests

  • RED: npm test -- src/utils/pipeline-factory.test.ts failed because reindexAll was called 0 times.
  • GREEN: npm test -- src/utils/pipeline-factory.test.ts
  • npm test
  • npm run build

Refs #164.
Related #200.

@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

We have received multiple PRs submitted by you. Thank you for your consistent contributions. We will review them one by one and provide feedback accordingly.

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.

2 participants