Repository navigation
[BUG] Preserve existing table when seed replacement fails - #63
Merged
Merged
Conversation
Collaborator
Author
|
Ready to merge. Reviewed the full PR at All CI checks passed on this commit: lint, UI, and the full Docker test suite (411 passed). CI run Additional review validation passed: 124 focused Dockerized tests plus MCP checks for failed-replacement preservation, transaction recovery, schema recreation, empty replacements, escaped values, and staging cleanup. GitHub reports the PR is mergeable with a clean merge state. |
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.
Closes #57
seed_tablecould erase an existing table's rows before validating replacement data, andrecreate=truecould drop the table before rejecting an invalid schema.This change validates recreated schemas and rows in a disposable managed table before touching the target. Normal reseeds now run DELETE and INSERT in one transaction, and failed SQL transactions are rolled back before the shared DuckDB connection is reused. MCP regression tests verify that invalid values and types preserve the original table, schema, and rows.
Validation:
tests/mcp_server/test_uc_tools.py— 14 passedtests/test_sql_statements.py tests/mcp_server/test_sql_tools.py— 45 passedruff check,ruff format --check, andgit diff --checkpassed