Fixed SQLite purges with world and block filters purging other tables - #1025
Open
tonyjamesstark wants to merge 1 commit into
Open
tonyjamesstark wants to merge 1 commit into
tonyjamesstark wants to merge 1 commit into
Conversation
On SQLite, /co purge r:#world i:<block> built the retain condition for world-scoped tables without checking the block restriction, so it purged co_container, co_chat and the other world-scoped tables in that world although a block restriction should leave them untouched. The entity_container/entity_interaction branch and the MySQL path already check it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdEuKbjcVoVinVQJq4te1f
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.
On SQLite,
/co purge t:30d r:#world i:stonealso deletes rows inco_container,co_chat,co_command,co_session,co_signandco_itemfor that world. The block restriction should limit the purge toco_block. MySQL and theentity_container/entity_interactionbranch already skip those tables.Cause: in the SQLite copy step of
PurgeCommand, the generic world-scoped branch builds the retain condition without checkingpurge. Fix:elsebecomeselse if (purge).To reproduce: on SQLite, log a container transaction and a stone break in one world. Then run
/co purge t:<age> r:#<world> i:stonefrom the console, with a time that covers both. Before the fix, the container row is deleted. After the fix, it stays.authored and tested with claude