Skip to content

disk-hygiene: the belt does not recognize Recycle Bin deletion, the very spelling the skill tells operators to prefer #2595

Description

@kyle-sexton

Problem

The skill's manual-handoff lane instructs the operator to prefer reversible removal (Recycle Bin) over permanent deletion. On Windows, PowerShell has no native Recycle Bin delete — Remove-Item is always permanent — so the documented-preferred path requires either the Shell.Application COM interface or Microsoft.VisualBasic.FileIO.FileSystem.

The PowerShell belt does not recognize either as a deletion spelling. The skill therefore steers the operator toward exactly the spelling its own guard cannot see.

Reproduction

During a real cleanup session, six directories were removed with:

Add-Type -AssemblyName Microsoft.VisualBasic
[Microsoft.VisualBasic.FileIO.FileSystem]::DeleteDirectory($path,'OnlyErrorDialogs','SendToRecycleBin')

All six executed with no permission prompt from the belt, while the disk-hygiene clean skill was the active work and the belt was live. For comparison, the same session's Bash lane correctly denied a bare ls -d.

Paths removed this way: C:\cpx-fixture, C:\tmp\openai-docs-cache, C:\ccxp, C:\cpo-6495, C:\builds, C:\cpx-6586.

Every one of these was human-approved and engine-verified first, so nothing was lost — but that is the operator's discipline holding, not the guard's.

Why this is not merely the documented gap

reference/safety-model.md already discloses that the PowerShell lane is a raised bar rather than a fail-closed lane, and that move / rename / overwrite / volume-format spellings are not flagged. This is different in kind: it is not an unflagged adjacent operation, it is the primary deletion path the skill tells you to prefer, unflagged. A guard that catches Remove-Item but not the reversible spelling inverts the incentive — the more careful operator gets less oversight.

Proposed change

Recognize as deletion spellings, at minimum:

  • Microsoft.VisualBasic.FileIO.FileSystem::DeleteDirectory / ::DeleteFile (any RecycleOption)
  • Shell.Application NameSpace(...) .MoveHere / InvokeVerb('delete') against the bin
  • Add-Type -AssemblyName Microsoft.VisualBasic immediately preceding a deletion call

Acceptance criteria

  • A Recycle Bin deletion through either interface produces the same final human prompt as Remove-Item.
  • The skill's "prefer reversible removal" instruction and the guard's coverage name the same set of spellings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.priority: needs-triageDefault until a priority tier is assigned.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions