Repository navigation
fix: protect claimed tasks from deletion by other sessions - #86
Merged
Merged
Conversation
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.
A task claimed through
todo → in_progresscan have no running execution record, so another session could previously soft-delete it despite the exclusive hold. Bothtaskboard_moveandtaskboard_deletenow share the same holder check inside the ledger mutation: another session receivesforbidden, and the task and claim remain intact.The holder may still soft-delete an idle task with the current version. Running executions continue to block deletion for everyone. Unclaimed tasks, other editing tools, and GUI user controls retain their existing permissions. Tool descriptions and task details explain the restriction; the Chinese and English READMEs and changelog include a short v0.9.8 entry linking #85 and this PR.
Validated after merging current
dev(241c817, including the ledger recovery fix in #87): typecheck, full build, and all 662 tests in 50 files passed on Node 22.23.1 (npm test -- --maxWorkers=2). Eight added cases cover same-project and cross-project outsiders, holder deletion, version conflicts, running execution protection, unchanged unclaimed deletion, and a holder changed on disk behind a stale store.Fixes #85.
GitHub CI passed on Node 22.x and 26.x for commit 5665b3e: typecheck, build, and full test suite (https://github.com/cloader/dsh-taskboard/actions/runs/41302503280).