Skip to content

docs: add deploy runbook for the public-titles corrector migration (F10)#709

Merged
BigSimmo merged 1 commit into
mainfrom
claude/audit-findings-review-phgz92
Jul 17, 2026
Merged

docs: add deploy runbook for the public-titles corrector migration (F10)#709
BigSimmo merged 1 commit into
mainfrom
claude/audit-findings-review-phgz92

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Adds docs/deploy-corrector-public-titles.md — a step-by-step runbook for applying the merged migration 20260717120000_corrector_public_titles_only.sql to the live Clinical KB Database project. Docs-only; no code/schema changes.

Covers:

  • Prerequisites (prod .env.local, Supabase login token + DB password; npx supabase needs no separate install).
  • Option A — terminal: supabase login/link → safety gates (check:supabase-project + migration list --linked) → db pushcheck:drift verify, with clear ✅/🛑 outcomes at each step.
  • Option B — Codex app: a paste-ready, approval-gated prompt that runs the read-only checks first, pauses for explicit "go", then pushes and verifies — with a note that it only works if Codex's environment holds production credentials.
  • Rollback note and why check:drift flips green after applying (it's the pending-migration state the push clears).

This closes out the F10 remediation trail with an operator-facing deploy guide — the code side already merged (#697 migration; #701 schema.sql mirror + regenerated drift manifest).

Verification

  • npx prettier --check docs/deploy-corrector-public-titles.md — clean
  • npm run verify:pr-local — not run (docs-only; no source/schema/test surface)

Clinical Governance Preflight

Not applicable — documentation only. No ingestion, answer generation, retrieval, schema, privacy, or production configuration is changed by this PR. (The runbook it documents is itself an operator step gated on production credentials + explicit confirmation.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01FJpsbpsmjJ2tLLXFfSe9GK


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a deployment runbook for applying and verifying the Clinical KB Database migration.
    • Documented prerequisites, approved execution workflows, migration verification, drift checks, and rollback guidance.
    • Included operational safeguards to help prevent unintended cross-tenant data exposure.

Step-by-step runbook to apply 20260717120000_corrector_public_titles_only.sql to
the live Clinical KB Database project. Covers prerequisites, a terminal path
(supabase login/link → check:supabase-project + migration list safety gates →
db push → check:drift verify) and a Codex-app path (a paste-ready, approval-gated
prompt), plus rollback and why check:drift flips green after applying. Docs-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FJpsbpsmjJ2tLLXFfSe9GK
@supabase

supabase Bot commented Jul 17, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


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

@BigSimmo
BigSimmo enabled auto-merge July 17, 2026 08:23
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a deployment runbook for applying and verifying the corrector_public_titles_only Supabase migration in production, including terminal and Codex workflows, approval gates, rollback guidance, drift behavior, and related documentation.

Changes

Corrector public titles deployment

Layer / File(s) Summary
Deployment workflows
docs/deploy-corrector-public-titles.md
Identifies the target migration, lists production prerequisites, and documents terminal-based and Codex-based application workflows with verification and approval steps.
Rollback and drift guidance
docs/deploy-corrector-public-titles.md
Describes manual rollback of the prior function definition, explains the expected drift-check change, and links related operational documentation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the docs-only runbook for the public-titles migration and names the main change.
Description check ✅ Passed The description follows the template well with Summary, Verification, and Clinical Governance notes, and it explains the docs-only scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/audit-findings-review-phgz92

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo merged commit f7c4e29 into main Jul 17, 2026
16 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
docs/deploy-corrector-public-titles.md (2)

133-137: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Clarify rollback as a coordinated revert docs/deploy-corrector-public-titles.md:133-137 should say rollback also updates supabase/schema.sql and regenerates supabase/drift-manifest.json; a live-only CREATE OR REPLACE leaves drift behind. If rollback isn’t intended, mark it unsupported/manual.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/deploy-corrector-public-titles.md` around lines 133 - 137, Update the
Rollback section in deploy-corrector-public-titles.md to describe rollback as a
coordinated change: update supabase/schema.sql and regenerate
supabase/drift-manifest.json alongside reverting the live definition. Do not
recommend a live-only CREATE OR REPLACE; if rollback is not supported,
explicitly label it unsupported/manual.

28-30: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Pin the Supabase CLI version used by this runbook. npx supabase can change behavior as the CLI evolves, so pin an explicit version in the command or repo toolchain and add a version check before production steps.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/deploy-corrector-public-titles.md` around lines 28 - 30, Update the
Supabase CLI usage in the runbook to pin an explicit version instead of invoking
unversioned npx supabase commands, and add a CLI version check before the
production steps. Keep the existing authentication and installation guidance
consistent with the pinned CLI version.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/deploy-corrector-public-titles.md`:
- Around line 133-137: Update the Rollback section in
deploy-corrector-public-titles.md to describe rollback as a coordinated change:
update supabase/schema.sql and regenerate supabase/drift-manifest.json alongside
reverting the live definition. Do not recommend a live-only CREATE OR REPLACE;
if rollback is not supported, explicitly label it unsupported/manual.
- Around line 28-30: Update the Supabase CLI usage in the runbook to pin an
explicit version instead of invoking unversioned npx supabase commands, and add
a CLI version check before the production steps. Keep the existing
authentication and installation guidance consistent with the pinned CLI version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 872b6cee-de27-4462-8fc7-26c66ddf48d1

📥 Commits

Reviewing files that changed from the base of the PR and between fd79bc8 and ea3b8f9.

📒 Files selected for processing (1)
  • docs/deploy-corrector-public-titles.md

@BigSimmo
BigSimmo deleted the claude/audit-findings-review-phgz92 branch July 17, 2026 14:36
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