Repository navigation
Preserve unreadable ticks and add targeted history removal - #136
Merged
Merged
Conversation
Keep unreadable ticks and each schedule's newest readable tick during ordinary pruning. Add explicitly targeted unreadable-history removal, with dry-run listing and locked rechecks that preserve repaired rows. Stop dispatch workers and inspect a dry run before removal. History removal can repeat a tick or skip the next tick through re-anchoring. MySQL key filters use table collation; primary-key selection avoids equivalent-key matches and handles SQLite byte-valued keys. Delete tick rows without Django deletion signals on every pruning path. Preserve task signals and ordinary model deletion behavior.
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.
What and why:
Let
ox_pruneand its dry run complete around unreadable ticks. Keep every unreadable tick and each schedule's newest readable tick.Add
--purge-unreadable-tickswith repeatable--schedule-keyand--tick-pkselectors. Require a selector; reject combinations with--queue,--older-thanor--include-failed. Re-read locked batches and keep repaired rows.Operator action: stop affected dispatch workers, dry-run the removal, and inspect listed rows and their tasks. Remove the history, then restart workers. Removal can repeat a tick or re-anchor and skip the next tick. MySQL key filters use the tick table's collation, so inspect equivalent-key matches or use primary keys. SQLite byte-valued keys require
--tick-pk.Compatibility: every pruning path deletes ticks without
pre_deleteorpost_delete. Task signals and ordinary model deletion are unchanged. Ordinary JSON output gains unreadable and anchor counts and unreadable-row details. Purge mode uses a separate object; warnings go to stderr.Tests: new tests in
tests/test_prune_unreadable.pyand updates totests/test_prune.py; 261 related tests pass on SQLite, ruff and format are clean, and the llms-full check passes. CI runs the full matrix.Changelog: not user-visible yet; the user-facing entry arrives with the release.