Reconcile search_schema_health index drift on live Supabase#266
Closed
BigSimmo wants to merge 2 commits into
Closed
Reconcile search_schema_health index drift on live Supabase#266BigSimmo wants to merge 2 commits into
BigSimmo wants to merge 2 commits into
Conversation
- Degrade invalid bearer tokens to anonymous scope instead of 401 - Allow public document read routes (list, detail, signed-url, search, images) - Align registry routes with medications/differentials auth-signal short-circuit - Let DocumentViewer load public sources without requiring sign-in - Add regression tests and update access-control expectations
Create missing retrieval-support indexes (trgm, composite btree, partial miss log) that were absent or only present under legacy names on live. Update search_schema_health() to accept verified functional equivalents during rollout. Set search_path for pg_trgm gin_trgm_ops in extensions. Verified on linked project: search_schema_health() ok=true, missing=[].
|
Updates to Preview Branch (cursor/reconcile-search-health-indexes-5f13) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
3 tasks
Owner
Author
|
Superseded by #269 (consolidated platform fixes branch). |
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
Fixes live
search_schema_health()failure (ok: false, 10 missing indexes) discovered during database review.20260705180000_reconcile_search_health_indexes.sqlthat creates canonical retrieval-support indexes missing on live (trgm, composite btree, partial miss-log indexes).search_schema_health()to accept verified functional equivalents (e.g.documents_title_search_tsv_idxfordocuments_title_trgm_idx) so health checks do not false-fail mid-rollout.search_path = public, extensions, pg_catalogin the migration sogin_trgm_opsresolves whenpg_trgmlives in theextensionsschema.supabase/schema.sqland adds regression coverage intests/supabase-schema.test.ts.Live verification (already applied)
Checks run
npx vitest run tests/supabase-schema.test.ts— 37/37 passedsearch_schema_health()— ok: true after migration applyOperator notes
sjrfecxgysukkwxsowpyduring this change; other environments should runnpx supabase db push --linked(or normal deploy migration workflow).set search_path(gin_trgm_opsnot found); fixed before successful apply.