Repository navigation
v3.30.5: preserve later task work and advance undo history - #98
Merged
Merged
Conversation
puretensor
force-pushed
the
audit/undo-preserve-later-work
branch
from
September 12, 2026 09:58
32c5232 to
e1256c5
Compare
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.
pt undocan delete work that has been claimed, promoted or advanced to its next recurrence. Its journal filter omits those events and reaches back to the task's creation. A separate history defect causes the second undo after two completions to reopen the same task again, fail, and leave the earlier completion untouched.The fix considers only each task's newest event within the existing 50-event window, checks its current state, and performs selection and reversal in one immediate SQLite transaction. This prevents an intervening writer from invalidating the selected history. Existing delete/reopen logic is reused through connection-taking helpers. Later edits and prior reversals protect the task; bare-create undo still works.
Original-code reproduction at
a95a43b:cargo test -p ptask-core undo_ --lockedproduced two failures: create/claim/undo deleted the task, and repeated undo returnedtask is not done/dismissed. Both tests now pass, alongside promotion/recurrence protection, manual reopen, priority edits after completion, existing priority-edit protection and bare-create undo. Severity: high for unintended deletion of active work; medium for blocked undo history.Validation on Rust 1.98.1, all exit 0:
Builds used a dedicated audit target directory and CPU fence; database tests used disposable stores.
Compatibility: a task with any newer event is skipped instead of reversing an older mutation underneath it; the search remains bounded to 50 task events. No schema change or dependency update. Workspace, internal requirements, lockfile and manpage bump together to v3.30.5. Independent branch from
mainata95a43b; no dependency on other audit PRs. Version stamps will need reconciliation when several independent audit PRs land. No production testing or deployment. Remote CI runs separately on this PR; local results above are executed checks.Additional validation limits
Native-feature tests include existing model-dependent cases that can return early when assets are unavailable; model-loaded coverage is not claimed. Local builds were debug workspace builds, not release or cross-target builds. Dependency-policy checks passed with pre-existing yanked
chacha20 0.10.0and unusedBSD-2-Clauseallowance warnings. The upstream-backed chacha20 correction is isolated in PR #102, not folded into this defect branch.