Skip to content

ci(supabase): the drift audit names dev's cause even when prod is the one failing - #726

Merged
thinkclay merged 1 commit into
mainfrom
claude/drift-audit-message
Sep 10, 2026
Merged

thinkclay merged 1 commit into
mainfrom
claude/drift-audit-message

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

#573 added a message so an out-of-order drift failure names the known cause instead of sending everyone to "investigate". It hardcodes one:

On dev this is currently 337_notification_cron_vault.sql, which cannot be applied until the two Vault secrets exist (see issue #564).

That text prints for every environment in the matrix. Right now prod and preview are failing on 348, 349 and 350 — none of them 337, none of them related to Vault secrets — and both are told to go read #564.

A message that names the wrong migration is worse than "investigate", because it looks authoritative. I wrote it, and it misled me first: I read the prod failure on #725 and went looking at 337.

Change

Parse the pending list out of the CLI output and name what this environment is actually missing. The #564 hint is kept, but only when 337 is genuinely among them.

Verified against both real outputs from the current run:

prod -> ...: 348_role_assignments_unique_nulls_not_distinct.sql
             349_content_reports_and_user_blocks.sql
             350_move_user_feedback_to_core.sql.
        (no #564 hint)

dev  -> ...: 337_notification_cron_vault.sql 348_...sql.
        337_notification_cron_vault.sql cannot be applied until the two Vault
        secrets exist — see #564.

Also drops "Resolve that rather than re-running", which described 337 specifically, in favour of the general truth: these sort before the last applied version and will never be picked up without a deliberate --include-all push.

Separately, and more important than this PR

The failure this exposes is real. 348, 349 and 350 are pending on all three environments — see the comment I left on #437. Notably 350 is the one that moved user_feedback into core, so /v1/feedback is still unreachable wherever that has not run.

… one failing

#573 added a message so an out-of-order drift failure names the known cause
instead of sending everyone to "investigate". It hardcodes one:

    On dev this is currently 337_notification_cron_vault.sql, which cannot be
    applied until the two Vault secrets exist (see issue #564).

That text prints for every environment in the matrix. Prod and preview are
currently failing on 348, 349 and 350 — none of them 337, none of them related
to Vault secrets — and both are told to go read #564. A message that names the
wrong migration is worse than "investigate", because it looks authoritative.

Parse the pending list out of the CLI output and name what this environment is
actually missing. The #564 hint is kept, but only when 337 is genuinely among
them.

Verified against both real outputs from the current run:

  prod -> "...: 348_role_assignments_unique_nulls_not_distinct.sql
           349_content_reports_and_user_blocks.sql
           350_move_user_feedback_to_core.sql."   (no #564 hint)

  dev  -> "...: 337_notification_cron_vault.sql 348_...sql. 337_... cannot be
           applied until the two Vault secrets exist — see #564."

Also drops "Resolve that rather than re-running", which described 337
specifically, for the general truth: these sort before the last applied version
and will never be picked up without a deliberate --include-all push.

Co-Authored-By: Claude Opus 5 <[email protected]>
@thinkclay
thinkclay merged commit 239a0b5 into main Sep 10, 2026
9 checks passed
@thinkclay
thinkclay deleted the claude/drift-audit-message branch September 10, 2026 20:05
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