chore(search): remove legacy indexed enterprise search

Merged
IC
1mo ago
+2147-23554

Summary

  • Remove the legacy indexed enterprise Search backend, setup flows, statistics, MCP schemas and runtime toggle. Enterprise Search uses the live backend; ordinary KB retrieval and document permissions remain intact.
  • Restrict deferred projection repair to ordinary KB vectors, with bounded pages, at most eight workers and a cap on deferred documents per pass.
  • Keep the database schema compatible during rollout. Data cleanup and index replacement are separate operator actions in #8534.
  • Upgrade Slack Search consent during explicit admin approval and preserve member-access setup links. Ordinary workflow reconnect keeps its configured permissions.
  • Reject restore, enable and fork-copy operations for retired Search documents. Remove legacy name-based adoption so ordinary KBs remain ordinary.

Type of Change

  • Maintenance / legacy feature removal

Testing

  • App and database type-checks, repository lint, all 54 audits, migration safety, block-registry and docs-manifest checks passed.
  • 216 focused unit tests passed, covering onboarding permissions, contracts and exact OAuth consent. Real PostgreSQL tests cover Slack policy upgrades, targeted reauthorization, idempotence and rollback.
  • 66 PostgreSQL checks in the changed setup, document and fork suites passed. New regressions failed before their fixes; ordinary KB controls pass. Earlier checks also covered processing rollback/recovery and vector repair.
  • Integration reports are written to apps/sim/test-results/integration.json by the disposable PostgreSQL/Redis runner.

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)