Skip to content

Preserve unreadable ticks and add targeted history removal - #136

Merged
PhiLily merged 1 commit into
mainfrom
prune-unreadable-ticks
Oct 10, 2026
Merged

PhiLily merged 1 commit into
mainfrom
prune-unreadable-ticks

Conversation

@PhiLily

@PhiLily PhiLily commented Oct 10, 2026

Copy link
Copy Markdown
Member

What and why:

Let ox_prune and its dry run complete around unreadable ticks. Keep every unreadable tick and each schedule's newest readable tick.

Add --purge-unreadable-ticks with repeatable --schedule-key and --tick-pk selectors. Require a selector; reject combinations with --queue, --older-than or --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_delete or post_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.py and updates to tests/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.

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.
@PhiLily
PhiLily merged commit 3d63c42 into main Oct 10, 2026
38 checks passed
@PhiLily
PhiLily deleted the prune-unreadable-ticks branch October 10, 2026 20:28
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