Skip to content

feat: public corpus promotion and retrieval-owner verification tooling#288

Closed
BigSimmo wants to merge 11 commits into
cursor/content-access-review-a385from
cursor/public-corpus-promotion-d970
Closed

feat: public corpus promotion and retrieval-owner verification tooling#288
BigSimmo wants to merge 11 commits into
cursor/content-access-review-a385from
cursor/public-corpus-promotion-d970

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Adds operational scripts for the public access rollout follow-up:

  • npm run check:retrieval-owner — validates live Supabase has retrieval_owner_matches, reports indexed public document count, and confirms hybrid RPCs accept the public sentinel (00000000-0000-0000-0000-000000000000).
  • npm run promote:public-documents — dry-run by default; --apply promotes indexed locally_reviewed / approved documents to owner_id IS NULL and clears owner on related tables.

Live verification (Clinical KB Database)

Ran against sjrfecxgysukkwxsowpy:

Check Result
retrieval_owner_matches sentinel ✅ true
Indexed public documents 1935
match_document_chunks_text with sentinel ✅ 5 results
Promotion candidates (default owner) 0 (corpus already promoted)

Usage

npm run check:retrieval-owner
npm run promote:public-documents          # dry-run
npm run promote:public-documents -- --apply
npm run promote:public-documents -- --owner-id <uuid> --limit 10 --apply

Notes

  • Promotion is idempotent when no candidates remain.
  • --apply mutates production data; dry-run first.
  • App layer must still send the public sentinel in production RAG paths (separate rollout).
Open in Web Open in Cursor 

BigSimmo and others added 11 commits July 5, 2026 22:49
fix: restore anonymous production setup-status for psychiatry.tools
- Re-apply indexing_v3_agent_jobs table and claim/update RPCs on live

- Codify match_document_embedding_fields_text with service_role-only execute

- Enable RLS on rag_visual_eval_* tables

- Fix edge function JSONB status RPC parsing

- Harden owner-scope and health deep-probe gating

- Restore .env.example; remove unused postgres npm dep

- Make gold-label governance advisory-only
Remove nested worktree references from the plugin branch and ignore
.worktrees/ so checkout and required status checks can pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ripts

Add check:retrieval-owner to validate the live sentinel migration and promote:public-documents with dry-run/--apply for locally reviewed docs.
@supabase

supabase Bot commented Jul 5, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy due to reaching the limit of concurrent preview branches.
Go to Project Integrations Settings ↗︎ if you wish to update this limit.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 5, 2026 17:05
@cursor

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@BigSimmo

BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

Organizing open PRs (Jul 6): Main already has public corpus promotion via merged #274. This branch appears to include mixed commits from several other stacks — recommend rebasing the unique verification-script work onto main as a fresh PR, or closing if fully superseded.

@BigSimmo

BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded by merged work on \main:

Production is live with these fixes. Any remaining unique commits should be cherry-picked onto a fresh branch from current \main.

@BigSimmo BigSimmo closed this Jul 5, 2026
@BigSimmo
BigSimmo deleted the cursor/public-corpus-promotion-d970 branch July 9, 2026 13:01
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