Skip to content

fix(db): retire unused keyword search projections - #8810

Merged
icecrasher321 merged 3 commits into
stagingfrom
codex/retire-keyword-projections
Oct 8, 2026
Merged

icecrasher321 merged 3 commits into
stagingfrom
codex/retire-keyword-projections

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Retired indexed Search still maintained keyword projections during chunk and ACL writes. Drop the unused GIN projection and stop Tin trigger, index, backfill, and connector-detachment maintenance. Require explicit force approval before retiring legacy GIN writers, then remove them before schema push can drop their table. Rejected pushes preserve writers; later reconciliation failure cannot break chunk writes.
  • Remove obsolete keyword migrations and the disabled retirement implementation with their replay tests. Keep the supported retirement command and the legacy CLI's redirect.
  • Preserve canonical chunks, ordinary KB keyword search, and vector repair. Keep Tin's compatibility table until this change is fully deployed and older connector workers have drained; drop that table in the follow-up contract.

Type of Change

  • Bug fix

Testing

  • Full root bun run test with CI's Node 24 runtime and four local workers, lint, type-check, all 58 audits, docs manifest, block registry, migration safety, and pinned actionlint.
  • 117 real PostgreSQL integration tests across migration/replay safety, the supported retirement command, keyword/vector search, ACL isolation, connector sync, detachment, and schema push; JSON reports include per-test results and duration.
  • Fresh db:migrate, fresh db:push, and an upgrade from the prior schema. Drizzle generates no further migration.
  • Regression failed before removal; disabling writer retirement or allowing cascading dependency deletion made the corresponding safety tests fail. A held-writer test also failed before adding bounded migration retries. The schema-push CLI regression reproduced the missing-relation error before pre-drop writer retirement.

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 Oct 8, 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 Oct 8, 2026 9:10pm UTC

Request Review

@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 36 files

Turn on auto-fix | Re-trigger cubic

Comment thread vitest.integration-durations.json
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical impact] The PR appears safe to merge; no new actionable issue was found.

Summary

This PR removes unused keyword projections and their maintenance while preserving ordinary knowledge-base search and vector repair.

  • Removes embedding_keyword_search and retires keyword triggers, indexes, and backfills.
  • Keeps embedding_keyword_tin available for older connector-detachment workers.
  • The latest update requires --force before schema push retires existing keyword writers.
  • The previous unnumbered finding is fully addressed: preparation retires GIN writers before Drizzle drops their table, or stops the push without changing them.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Schema push] --> B{Keyword writers exist?}
  B -->|Yes, without force| C[Stop without changing writers]
  B -->|Yes, with force| D[Retire writers atomically]
  B -->|No| E[Run Drizzle push]
  D --> E
  E --> F[Run reconciliation steps]
Loading

Reviews (3) · Last reviewed commit: "fix(db): require approval before retirin..." · Reviewed by Greptile

Comment thread packages/db/scripts/push.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 Oct 8, 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 38 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread packages/db/scripts/push.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 Oct 8, 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 38 files

Confidence score: 5/5

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

Turn on auto-fix | Re-trigger cubic

@icecrasher321
icecrasher321 merged commit 0f5590d into staging Oct 8, 2026
47 of 48 checks passed
@icecrasher321
icecrasher321 deleted the codex/retire-keyword-projections branch October 8, 2026 21:25

This branch was successfully deployed

1 active deployment
Preview — 530ffdc6 Deployed Oct 8, 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