Skip to content

feat: promote all indexed documents public regardless of validation status#294

Merged
BigSimmo merged 3 commits into
mainfrom
cursor/promote-unverified-public-a385
Jul 5, 2026
Merged

feat: promote all indexed documents public regardless of validation status#294
BigSimmo merged 3 commits into
mainfrom
cursor/promote-unverified-public-a385

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Removes the clinical_validation_status gate that kept ~130 unverified indexed documents private. Public access is already keyed on owner_id IS NULL; this change updates promotion tooling and adds a follow-up migration so the full indexed corpus can be made public.

Changes

  • scripts/promote-public-documents-batch.ts — promote any owned indexed document, not only locally_reviewed / approved.
  • scripts/promote-public-documents.ts — same candidate filter removal; updated operator guidance.
  • supabase/migrations/20260706120000_promote_remaining_indexed_documents_public.sql — one-shot migration to promote all remaining owned indexed documents and cascade owner_id = null to related artifact tables.

The earlier migration 20260705220000_promote_locally_reviewed_documents_public.sql is left as-is (already applied on live).

Post-merge rollout

On the linked Supabase project (sjrfecxgysukkwxsowpy):

npm run promote:public-documents:batch
# or
npx supabase db push --linked

Expected result: all ~2,065 indexed documents public (owner_id IS NULL); ~130 currently unverified owned docs promoted.

Notes

  • Read APIs (withOwnerReadScope) were already validation-status agnostic — this fixes promotion/data, not route logic.
  • Source governance warnings for unverified sources in answers are unchanged (clinical safety).
Open in Web Open in Cursor 

@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 18:02
@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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Batch promotion skips artifact cascade
    • Updated promoteBatch to set metadata.public_corpus and null owner_id on all eight artifact tables so batch promotion matches the migration cascade.

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 6b47aa1. Configure here.

Comment thread scripts/promote-public-documents-batch.ts
The batch promoter now mirrors the migration by setting metadata.public_corpus
and nulling owner_id on all eight artifact tables, not just documents.
@BigSimmo
BigSimmo enabled auto-merge July 5, 2026 18:33
@BigSimmo
BigSimmo merged commit 4fde750 into main Jul 5, 2026
5 checks passed
@BigSimmo
BigSimmo deleted the cursor/promote-unverified-public-a385 branch July 8, 2026 16:26
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.

2 participants