You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a resumable script migration that discovers and retires the sole legacy Search KB without cleanup flags, preserving other KBs and live source configuration. Persist the selected target and defer ambiguous databases.
Save each bounded page's cursor in the same transaction as its changes; defer unfinished work and recheck for late documents or chunks before recording completion.
Reject dormant Search uploads before creation and stop dispatch and queued processing before billing or embedding writes. Document deployment, continuation, and storage maintenance.
Type of Change
Bug fix and maintenance
Testing
The full DB PostgreSQL suite (110 checks) and ten app integration checks passed, covering cleanup scope, cascades, bounded resumption, rollback, late documents, upload admission, queued processing, and indexed-mode transaction integrity.
Upload admission, late-document retirement, and both queued-processing regressions were reproduced before their fixes.
The DB unit suite and all 43 affected document-processing unit tests passed. Billing and quota fixtures now account for the KB eligibility read. Existing transaction fixtures now explicitly enable indexed Search; removed a duplicate registry test and scoped the older migration-journal assertion to the upgrade it proves.
App and DB type-checks, lint, all 52 audits (including API validation), docs-manifest and block-registry checks passed. Migration safety check reports no new schema migrations.
Broader local document suite: 319/320 passed; the unchanged SDK cancellation test failed locally on Node 23.11 and passed in CI.
No production cleanup or storage maintenance was executed.
Checklist
Code follows project style guidelines
Self-reviewed my changes
Tests added/updated and passing (new tests pass the test-audit authoring gate)
[Critical risk] Adds database migration to delete search embeddings and retire legacy search index.
The PR appears safe to merge based on the changes reviewed.
Summary
This PR retires embeddings from a selected legacy Search knowledge base through a resumable, bounded migration while preserving other knowledge bases and live source configuration. It also blocks dormant Search uploads and processing, and documents the cleanup and recovery lifecycle.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Discover sole legacy Search KB] --> B[Persist selected target]
B --> C[Retire documents in bounded pages]
C --> D[Delete target embeddings in bounded pages]
D --> E{Unretired documents or chunks remain?}
E -- Yes --> C
E -- No --> F[Record completion]
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
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
Type of Change
Testing
Checklist
test-auditauthoring gate)