Skip to content

feat(vfs): enforce folder soft-delete cascade and selective restore - #286

Merged
allenporter merged 1 commit into
mainfrom
feat/vfs-tree-invariants-and-restore
Oct 18, 2026
Merged

allenporter merged 1 commit into
mainfrom
feat/vfs-tree-invariants-and-restore

Conversation

@allenporter

@allenporter allenporter commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Enforces consistent VFS folder soft-delete and restoration invariants (Part 1 of #248):

  • Soft-delete cascade (VirtualFileSystem.delete_node): Soft-deleting a folder cascades inactivation (is_active = 'N') across all active descendants so child items no longer appear in active directory listings, search results, or storage usage calculations.
  • Selective restore & parent validation (VirtualFileSystem.restore_node): Validates that the target node's parent directory exists and is active (raising ParentNotFound otherwise), and when restoring a folder, reactivates only descendants that were inactivated by the folder cascade (preserving is_active = 'N' for items with their own RecycleFileDO entry).

(Permanent recycle bin purge and reference-counted blob cleanup are handled in #288.)

@codecov-commenter

codecov-commenter commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.07692% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.27%. Comparing base (aa38acd) to head (affc7fd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
supernote/server/services/vfs.py 97.95% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #286      +/-   ##
==========================================
- Coverage   91.28%   91.27%   -0.02%     
==========================================
  Files         116      116              
  Lines       12336    12383      +47     
==========================================
+ Hits        11261    11302      +41     
- Misses       1075     1081       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@allenporter
allenporter force-pushed the feat/vfs-tree-invariants-and-restore branch 3 times, most recently from 155f082 to e4ff53d Compare October 18, 2026 22:01
@allenporter allenporter changed the title feat(server): enforce VFS deletion invariants, selective restore, and parent checks feat(vfs): enforce folder soft-delete cascade and selective restore Oct 18, 2026
@allenporter
allenporter force-pushed the feat/vfs-tree-invariants-and-restore branch from e4ff53d to affc7fd Compare October 18, 2026 22:13
@allenporter
allenporter merged commit ab5425d into main Oct 18, 2026
4 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.

2 participants