fix(transfer): preserve Knowledge Pages during bank transfer (#3308) - #3317
Closed
Sanderhoff-alt wants to merge 2 commits into
Closed
fix(transfer): preserve Knowledge Pages during bank transfer (#3308)#3317Sanderhoff-alt wants to merge 2 commits into
Sanderhoff-alt wants to merge 2 commits into
Conversation
Re-embed restored mental models with the target provider. Rebuild PostgreSQL lexical projections when required.
Export knowledge-page rows and restore parent nodes before children.
Contributor
Author
|
Closing this PR because #3330 has been merged and provides an equivalent fix, covering Knowledge Pages transfer and target-side mental-model search-state regeneration. |
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.
Summary
knowledge_pagesin whole-bank archives and restore nodes parent-first.Approach
Whole-bank archives intentionally omit
embeddingandsearch_vector. Mental models are restored as rows, so import rebuilds this derived state on the target after row restoration. Embeddings are generated before taking the write connection.Knowledge Page nodes are restored after their backing mental models. A small topological pass orders folder parents before descendant folders and pages.
Scope
This PR is intentionally limited to the transfer boundary. It does not change normal mental-model create/update/clear/rename lifecycle behavior, startup reconciliation, or database abstractions.
PR #3315 takes a broader approach and depends on #3313 for lifecycle-wide search-state maintenance. That work may be valuable independently. For this transfer-specific bug, this PR aims to keep review and rollout simpler by reusing the existing PostgreSQL search-vector expression helper, checking whether the target column is generated, and avoiding a dependency on the broader lifecycle change.
Knowledge Page query adaptation for non-native PostgreSQL text backends remains outside this PR.
Verification
Closes #3308.