Skip to content

feat(cli): opt-in migration checks in supabase init (CLI-2784) - #7349

Open
mdonnalley wants to merge 4 commits into
developfrom
mikedonnalley/cli-2784-init-migration-checks
Open

mdonnalley wants to merge 4 commits into
developfrom
mikedonnalley/cli-2784-init-migration-checks

Conversation

@mdonnalley

@mdonnalley mdonnalley commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

supabase init can write a [db.migrations.checks] section to config.toml when SUPABASE_EXPERIMENTAL_MIGRATION_CHECKS is set to a true value (1, true, ...). The section sets every security rule to warn, explains what error, warn and off do, and includes a commented-out [db.migrations.checks.exclude] example. Without the variable, init writes the same config.toml as before.

The variable is shell-only and has no config key, so the feature can be dogfooded without changing customer output. bootstrap honours it on the blank template path, since that path runs the same init.

@mdonnalley
mdonnalley requested a review from a team as a code owner October 27, 2026 14:34

@github-actions github-actions 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.

🤖 AI Review

Both independent reviews were available; Codex reported no findings. Code inspection confirms Claude’s two documentation correctness issues and one wording nit. The generated configuration advertises migration-check enforcement and a baseline command that are not implemented in this checkout.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/shared/init/project-init.templates.ts:71 documentation claude The generated config incorrectly promises security checks on every migration and blocking rollback for rules set to "error". Users following this guidance receive no such protection in this checkout.
🟡 MINOR apps/cli/src/shared/init/project-init.templates.ts:85 documentation claude The generated config recommends supabase db advisors --baseline, but that command does not support a baseline flag or populate migration-check exclusions.
⚪ NIT apps/cli/src/shared/init/project-init.templates.ts:72 documentation claude The phrase "while we measure false positives" embeds temporary team rollout context in users’ persistent configuration files.

Stats

Claude findings: 3 · Codex findings: 0 · Confirmed: 3 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

@avallete avallete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, pending this until we have the clear on M0 for this.

Don't wanna merge it yet since it's customer facing, for any supabase init. I think this should be hidden behind a feature flag so we can dogfood and ship the code but not change the customer output yet.

@mdonnalley mdonnalley changed the title feat(cli): write migration checks at warn in supabase init (CLI-2784) feat(cli): opt-in migration checks in supabase init (CLI-2784) Oct 27, 2026
@mdonnalley
mdonnalley added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@mdonnalley
mdonnalley added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@mdonnalley
mdonnalley added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@mdonnalley
mdonnalley added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@mdonnalley
mdonnalley added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
Base automatically changed from next to develop October 29, 2026 21:08

This branch has not been deployed

No deployments
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