Skip to content

test(onboarding): temporarily disable 41_test_demo_app_cleanup.sql#2299

Merged
WcaleNieWolny merged 1 commit into
mainfrom
disable-demo-cleanup-test-temp
May 19, 2026
Merged

test(onboarding): temporarily disable 41_test_demo_app_cleanup.sql#2299
WcaleNieWolny merged 1 commit into
mainfrom
disable-demo-cleanup-test-temp

Conversation

@WcaleNieWolny
Copy link
Copy Markdown
Contributor

TL;DR

Unblocks CI on main. Renames
supabase/tests/41_test_demo_app_cleanup.sql to .sql.disabled so
supabase test db skips it. Temporary — a follow-up PR will fix
the underlying guard-vs-test conflict properly.

Why

The production-safety guard added to clear_onboarding_app_data in
#2296 refuses to delete data for apps that show any sign of real
production use: rows in public.devices, public.channel_devices,
or public.deploy_history (beyond a preserved version).

41_test_demo_app_cleanup.sql seeds an "onboarding" app with all
three of those tables populated, then asserts the cleanup wipes
everything. The guard correctly classifies that fixture as
"looks like a real production app" and refuses, so 11 of 12
assertions fail (see run #26092388428).

This is the same behavior that prevents the #2295 cascade from
recurring — the guard is doing its job; the test is asserting the
old, unsafe semantics.

What this PR does NOT do

It does not change runtime behavior. The guard, trigger, and
function definitions from #2296 are untouched. Only the test file
is renamed so the test runner skips it.

Follow-up (separate PR)

Two reasonable options, to be decided out of incident mode:

  1. Loosen the guard slightly (drop the channels.version
    check, keep devices/channel_devices/deploy_history) so a
    genuine fresh-onboarding app with a placeholder channel still
    gets cleaned up, and update the test to drop the
    production-signal seeds. This preserves the legitimate
    placeholder cleanup capability.
  2. Drop clear_onboarding_app_data entirely. The auto-fire
    trigger from [codex] Complete onboarding after first upload #2291 is already gone, so the only remaining caller
    is capgo init's explicit completion flow. If we accept that
    capgo init should not silently wipe data either, the function
    can go away and this test gets deleted, not just disabled.

Test plan

  • CI on this branch goes green (specifically test / Run Supabase Test DB).
  • Confirm supabase test db locally no longer includes
    41_test_demo_app_cleanup.sql.

Refs

After #2296 added the production-safety guard to
`clear_onboarding_app_data` (refuses to delete when any of `devices`,
`channel_devices`, or `deploy_history` rows exist), this test fails
because it seeds an "onboarding" app with all three of those tables
populated and then asserts the cleanup wipes everything. The guard
correctly classifies that fixture as "looks like a real production
app" and refuses. 11 of 12 assertions then fail.

Disabling the file (via `.disabled` suffix so `supabase test db`
skips it) to unblock CI on main. A proper fix follows in a separate
PR that either (a) loosens the guard to allow placeholder cleanup
while keeping the #2295 protections, plus updates the test to drop
the production-signal seeds; or (b) deletes the cleanup function
entirely and removes the test.

Refs: #2295, #2296
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • supabase/tests/41_test_demo_app_cleanup.sql.disabled
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d2dd4877-f88d-4451-a0e2-449aae06bd82

📥 Commits

Reviewing files that changed from the base of the PR and between 64d9104 and eafa63b.

📒 Files selected for processing (1)
  • supabase/tests/41_test_demo_app_cleanup.sql.disabled

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch disable-demo-cleanup-test-temp

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

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented May 19, 2026

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing disable-demo-cleanup-test-temp (eafa63b) with main (64d9104)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review


P2 Badge Keep onboarding cleanup covered in CI

In the CI path I checked (.github/workflows/tests.yml runs supabase test db), renaming this file to .sql.disabled removes the only repo test coverage for clear_onboarding_app_data under supabase/tests (verified with rg). That leaves the active onboarding-completion cleanup path untested; if the production-safety guard regresses to deleting real app data again, or if fresh placeholder cleanup stops working entirely, the database test suite will no longer catch it. Please keep a pared-down .sql test that matches the new guard semantics instead of disabling the file wholesale.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sonarqubecloud
Copy link
Copy Markdown

@WcaleNieWolny WcaleNieWolny merged commit 0ff2ce0 into main May 19, 2026
42 checks passed
@WcaleNieWolny WcaleNieWolny deleted the disable-demo-cleanup-test-temp branch May 19, 2026 12:18
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