Skip to content

fix(disk-hygiene): call the IFileOperation recycle slots (#4007) - #5097

Closed
kyle-sexton wants to merge 5 commits into
mainfrom
cursor/4007-windows-recycle-apply-37e9
Closed

kyle-sexton wants to merge 5 commits into
mainfrom
cursor/4007-windows-recycle-apply-37e9

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #4007.

Summary

The vtable indexes pointed at DeleteItems and past the interface, and the recycle-flag test was parsed as a comparison against zero — both would let a Windows apply miss the recycle path. HRESULT is not importable from ctypes on Linux, so the COM prototypes use c_long. Failed recycle must not become a permanent delete.

Test plan

  • Recycle-path tests on the branch
Open in Web Open in Cursor 

@github-actions

Copy link
Copy Markdown
Contributor

PR body contract — issue linkage

This PR body does not yet satisfy the issue-linkage contract:

  • Missing a "## Fix" section. State the concrete change and how it addresses the problem.
  • Missing a "## Verification" section. Record concrete evidence the change works (commands, gates, output).
  • Missing a "## Related" section. List related PRs, ADRs, or decision-log entries this PR does not close.

Edit the body and this comment updates itself on the next run.

cursoragent and others added 2 commits September 28, 2026 12:37
Windows apply uses FOFX_RECYCLEONDELETE after the existing preview and
token gate, revalidates bottom-up, and refuses a path the bin cannot
accept instead of deleting it permanently. execution_blockers is per
primitive. macOS stays unsupported, and the manual handoff remains.

Co-authored-by: Kyle Sexton <[email protected]>
The vtable indexes pointed at DeleteItems and past the interface, and the
recycle-flag test was parsed as a comparison against zero. Both would let a
Windows apply miss the recycle path. HRESULT is not importable from ctypes
on Linux, so the COM prototypes use c_long.

Co-authored-by: Kyle Sexton <[email protected]>
@cursor
cursor Bot force-pushed the cursor/4007-windows-recycle-apply-37e9 branch from 1745775 to 9ff551c Compare September 28, 2026 12:37
kyle-sexton and others added 3 commits September 28, 2026 12:06
…-dashes findings

- windows_recycle.py: wrap the FOF_* Windows SDK flag constants in a
  spellchecker:off/on block; typos read FOF as a typo for FOR.
- test_windows_recycle.py: replace the literal C:/Users/me fixture path
  with the <user> placeholder the machine-specific-paths gate allows.
- windows-recycle-security-review.md: rewrite the em dash in the title
  as a colon; this reference lives on a surface plugins/disk-hygiene
  already declared purged in scripts/em-dash-purged-paths.txt.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PT4esxbdC7eQiwQxy35Mie
# Conflicts:
#	plugins/disk-hygiene/.claude-plugin/plugin.json
#	plugins/disk-hygiene/CHANGELOG.md
Resolve CHANGELOG.md/plugin.json conflicts in disk-hygiene: PR's
version 0.29.0 already above main's 0.28.8, kept as-is; both
CHANGELOG entries preserved, PR's on top.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PT4esxbdC7eQiwQxy35Mie
@kyle-sexton

Copy link
Copy Markdown
Member Author

Closing by operator decision (2026-09-28): engine-native Windows recycle reverses the #1116 decline, which requires a maintainer security review; none is recorded on #4007. Reopen once that review is done.

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.

disk-hygiene: build an engine-native Windows Recycle Bin apply instead of model-composed deletion commands

2 participants