Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Diagnosis
Read-only EXPLAIN showed the existing search-vector GIN index used by counts, while sorted LIMIT 24 rows chose the cached-at index and filtered vectors row by row. The materialized-ID query plans GIN bitmap scan → lightweight candidate sort → bounded primary-key hydration. This is a plan-level diagnosis, not a measured latency claim.
Verification
Migration status: approval required, not applied
Production apply_migration was denied because creating a persistent RPC and granting EXECUTE to anon/authenticated needs explicit approval for this production rollout. No database changes occurred. Do not merge until approved, applied and anonymous runtime checks pass.
The only database change is this new read-only function. It uses the existing security-invoker library view/RLS, returns no new fields, sets an empty search_path, limits output to 96 rows, revokes PUBLIC execution and grants execution only to the existing anon/authenticated library audience. No table data, extensions, indexes, credentials, RLS policies or timeout settings are changed.
After approval: apply the included migration; test FTS, metadata, punctuation, no-match and trending queries as anon under the existing 3-second statement limit; verify security advisors have no new findings; then verify preview CI, merge and verify production.
Metadata searches still lack trigram indexes; one materialized scan may be sufficient, but actual runtime checks determine whether further work is needed. No index build is included.
Exact-head CI result
Head
9134af84c72f2b6458cf9ef01839f807711610b7passed the library-search workflow: frozen install, all 32 tests, TypeScript and focused ESLint. Vercel previewdpl_A1rcx6ypiBNHBcdEzemRDt6jXwTais READY. As of 2026-10-06 13:55 UTC, the production function does not exist and no migration is recorded. Waiting for explicit production migration approval; this PR remains draft and unmerged.