Skip to content

fix(search): retire indexed content across all Search KBs - #8441

Merged
icecrasher321 merged 2 commits into
stagingfrom
codex/retire-all-search-knowledge-bases
Sep 30, 2026
Merged

icecrasher321 merged 2 commits into
stagingfrom
codex/retire-all-search-knowledge-bases

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Retire indexed content from every Search-marked knowledge base using one shared scan and 25,000-row SQL pages, preserving ordinary KBs and live Search configuration.
  • Supersede the single-KB migrations with 0029, so failed, partially completed, and already-journaled deployments all receive the expanded cleanup and index maintenance.
  • Persist the selected KB set, validate each page's Search markers, and resume committed cleanup/reindex/vacuum checkpoints after interruption.

Type of Change

  • Bug fix

Testing

  • Real PostgreSQL: 122 DB integration tests passed, including multi-KB scope, stale legacy checkpoint upgrades, changed-marker rollback and completion checks, interrupted cleanup, and concurrent reindex recovery. Regression cases fail on the prior implementation. Repeatable report: packages/db/test-results/integration.json.
  • 104 DB unit tests passed; DB type-check, root lint, API validation, migration safety, block-registry checks, docs-manifest check, and the full repository audit suite passed.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 30, 2026 12:59am UTC

Request Review

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread packages/db/script-migrations/0027_retire_search_embeddings.ts Outdated
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical risk] Expands database cleanup to retire all legacy search indexes.

The PR appears safe to merge based on the changes reviewed.

Summary

The PR expands Search-index retirement from one knowledge base to a frozen set of all Search-marked knowledge bases. It adds a successor migration that resumes legacy checkpoints, validates selected markers before completion, and runs index maintenance. The two previous findings are addressed.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[0029 starts] --> B[Snapshot Search KBs]
  B --> C[Retire documents in pages]
  C --> D[Delete embeddings in pages]
  D --> E[Validate all target markers]
  E --> F[Reindex and vacuum]
  F --> G[Record migration receipts]
Loading

Reviews (2) · Last reviewed commit: "fix(search): validate retirement scope t..."

Comment thread packages/db/script-migrations/0027_retire_search_embeddings.ts Outdated
Comment thread packages/db/script-migrations/0027_retire_search_embeddings.ts
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@icecrasher321
icecrasher321 merged commit 3841b94 into staging Sep 30, 2026
33 checks passed
@icecrasher321
icecrasher321 deleted the codex/retire-all-search-knowledge-bases branch September 30, 2026 01:20

This branch was successfully deployed

1 active deployment
Preview — f76c4175 Deployed Sep 30, 2026 by vercel[bot]
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