fix(db): repair Supabase Preview migration replay failures - #305
Merged
Conversation
…nel rewrite Supabase Preview branches fail with SQLSTATE 42P13 when this migration attempts CREATE OR REPLACE on a function whose OUT signature differs from the live database. Drop first, matching the phase-7 migration pattern. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…lumn Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
BigSimmo
marked this pull request as ready for review
July 5, 2026 23:50
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Uh oh!
There was an error while loading. Please reload this page.
15 tasks
Merged
11 tasks
BigSimmo pushed a commit
that referenced
this pull request
Aug 12, 2026
… issues, contract pins Review of the RAG canary infrastructure (2026-08-12) found the mechanism sound but with manual/silent gaps. This change mechanizes and pins them; no retrieval behaviour changes. - compare-retrieval-eval: new per-case rr@10/contentRR@10 diff with --fail-on-regression, mechanizing the canary-pair protocol's 'zero per-case rr regressions' gate that was previously eyeballed from tee'd logs; fails closed on summary-only artifacts and non-identical case sets. - eval-canary.yml: open the failure issue on failed dispatches too (a red dispatch is usually half a canary pair), and feed answer-targeting.log, validate_override and answer_targeting outcomes into the issue body. - build-ranking-snapshot: fail loudly when a hardNegativeTemplates caseId matches no artifact case (a renamed golden case previously dropped its hard negatives silently); CLI guarded so tests can import convertArtifact. - New contract tests: hard-negative attachment guard, and a strict/wide alias-tier pin so a bulk merge of src/lib/eval-document-matching.ts into scripts/lib/clinical-aliases.ts can no longer pass CI. - docs/rag-behaviour: fix stale claims that the canary has workflow_dispatch / a ref input (both deliberately absent); document the per-case compare command. - outstanding-issues: capture the snapshot-freshness dispatch handoff (#304) and deferred canary observations (#305). RAG impact: no retrieval behaviour change — canary tooling, docs, and contract-test hardening only; golden fixture and ranking code untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UoHPMZ1FinSYzH7rJ42xTo
BigSimmo pushed a commit
that referenced
this pull request
Aug 12, 2026
…d rows The conflict was one hunk. Resolved by keeping this branch's #302 (re-measured 2026-08-12, newer than main's) and all four of main's genuinely new rows (#304, #305, #306, #307), dropping only main's older #302 and its #303, which this branch had already archived as delivered after probing the CLI. Correcting an earlier claim in this branch's history: #302 and #303 were NOT lost by main. Main renumbered them to #306 and #307 after the id collision, which is exactly what the guard advises. Both are re-filings of work already done, and both are archived here with evidence — style-contracts.ts:352-354 is clean, and the marker reads 308 against a highest declared id of 307. The derived loss detector reports one exception, #262, which is intentional: main's version of that row is newer than this branch's. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017paT42ZVMf8jaLtkjFxdy5
This was referenced Aug 18, 2026
Merged
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 freeto 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 failing Supabase Preview checks caused by two migration replay issues.
1.
match_document_chunks_textreturn type change (SQLSTATE 42P13)PostgreSQL rejects
CREATE OR REPLACEwhen OUT columns differ from the live database. Added the sameDROP FUNCTION IF EXISTSguard used in phase-7 migrations before recreatingmatch_document_chunks_text.2. Promote migration references non-existent
updated_atcolumns (SQLSTATE 42703)20260706120000_promote_remaining_indexed_documents_public.sql(merged via #294) attempted to setupdated_atondocument_table_factsanddocument_embedding_fields, which only havecreated_at. Removed the invalid column updates.Changes
supabase/migrations/20260705210000_retrieval_owner_filter_sentinel.sql— drop before recreatesupabase/migrations/20260706120000_promote_remaining_indexed_documents_public.sql— omitupdated_aton tables without itsupabase/schema.sql— drop before recreatetests/supabase-schema.test.ts— replay guard testVerification
npm run verify:cheap— passnpm run test -- tests/supabase-schema.test.ts— pass