fix(db): require explicit opt-in for destructive migration tests#2938
Draft
yinkev wants to merge 1 commit into
Draft
fix(db): require explicit opt-in for destructive migration tests#2938yinkev wants to merge 1 commit into
yinkev wants to merge 1 commit into
Conversation
Signed-off-by: Kevin Yin <182213728+yinkev@users.noreply.github.com>
Author
|
@codex review |
yinkev
force-pushed
the
fix/buzz-db-destructive-test-guard
branch
from
July 26, 2026 09:17
ca0d620 to
8d691a9
Compare
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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 free
to 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
BUZZ_TEST_DESTRUCTIVE_DB=1and an explicit non-emptyBUZZ_TEST_DATABASE_URLbefore any test can drop thepublicschema;#[ignore]was not a sufficient boundary becausecargo test -p buzz-db --lib -- --ignoredis a natural way to request the Postgres-backed tests. Before this change, that command could resolve topostgres://buzz:buzz_dev@localhost:5432/buzzand executeDROP SCHEMA IF EXISTS public CASCADEagainst a developer's live Desktop database.Related issue
Fixes #2916
No competing implementation was found before opening this PR.
Testing
cargo test -p buzz-db --lib— 85 passed, 121 intentionally ignoredcargo clippy -p buzz-db --all-targets -- -D warningscargo test -p buzz-db destructive_database_tests_require_explicit_opt_in_and_url --libcargo run -p buzz-admin -- migrate;buzz-dbpackage suite;--test-threads=1— 3 passed;git diff --checkjust cicompleted the workspace Rust formatting and clippy stages, then stopped at the existing file-size gate for untoucheddesktop/src-tauri/src/managed_agents/runtime.rs(current upstream is already above its configured ceiling). This PR does not modify that file.