Skip to content

fix: include tasks in DeleteFileAtomic transaction#208

Merged
raphi011 merged 1 commit into
mainfrom
fix/delete-file-atomic-tasks
Mar 26, 2026
Merged

fix: include tasks in DeleteFileAtomic transaction#208
raphi011 merged 1 commit into
mainfrom
fix/delete-file-atomic-tasks

Conversation

@raphi011

Copy link
Copy Markdown
Owner

Summary

  • Add DELETE FROM task WHERE file = ... to the DeleteFileAtomic transaction, ensuring tasks are cleaned up atomically alongside chunks, wiki links, and label edges
  • Previously tasks relied solely on an async SurrealDB cascade event (cascade_delete_file_tasks), which could silently fail after 3 retries and leave orphaned rows
  • Extend TestDeleteFileAtomic to create a task before deletion and verify it's removed

Test plan

  • just test passes
  • TestDeleteFileAtomic covers task cleanup

🤖 Generated with Claude Code

@raphi011 raphi011 force-pushed the fix/delete-file-atomic-tasks branch from ea78a14 to 16463d4 Compare March 26, 2026 21:21
Add DELETE FROM task to DeleteFileAtomic transaction and explicit
associated-data cleanup to DeleteFilesByPrefix, ensuring tasks are
cleaned up synchronously rather than relying solely on async cascade
events that can silently fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@raphi011 raphi011 force-pushed the fix/delete-file-atomic-tasks branch from 16463d4 to 8c52b26 Compare March 26, 2026 21:25
@raphi011 raphi011 merged commit 7e6b578 into main Mar 26, 2026
5 checks passed
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