Skip to content

v5.08 — The deletion guard judges every part of a command and the path it acts on

Choose a tag to compare

@cody-hutson cody-hutson released this 15 Nov 17:22
Immutable release. Only release title and notes can be modified.
v5.08
4e70b20

The deletion guard judges every part of a command and the path it acts on

2026-11-15 · v5.08

A command that deletes files or moves them to the Trash is now judged in every part of the line, on the path the shell will act on, so a harmless earlier part no longer lets a later deletion through. Deletion words that a command only carries as text, such as a commit message written through a quoted here-document, no longer get the command refused when nothing is deleted.

Skip the rest unless your sessions delete files or move them to the Trash from the command line, write commit messages or issue bodies through a here-document, or you review what the deletion guard refuses.

Who this affects

  • Anyone whose sessions run shell commands on a workspace that has taken this release's guard bundle
  • Operators who read the deletion guard's refusals, or who maintain the guards

What changed for everyone using the platform

  • Every part of a command is judged. A deletion or a move to the Trash is now judged wherever it sits on the line, including after a git command or after a deletion that names no target. Why it matters: a harmless first part of a command can no longer carry a deletion outside your workspace past the guard.

  • A deletion that does not show all its targets on its line is refused. A deletion or Trash call with no target, or whose targets continue onto the next line, is refused rather than allowed. Why it matters: the guard no longer lets through a call whose targets it cannot see.

  • Text a command only reads is no longer treated as a deletion. When a quoted here-document is read by a program that only reads it, deletion words inside it no longer get the command refused. The readers are cat, a git commit or git tag message, a GitHub CLI issue, pull request, release or API body, and a Python program read from standard input. Why it matters: a commit message or an issue body that mentions a deletion command no longer fails when nothing is deleted.

  • The outside-workspace check uses the path the command acts on. The Trash location the guard itself recommends is recognised, the target and your workspace root are compared in the same form, and a target word the shell would rewrite before acting on it is refused rather than guessed at. Why it matters: a link, a trailing slash or an unusual spelling of a path can no longer make a target outside your workspace read as inside it.

  • A home-relative path on a line that changes HOME is refused. Why it matters: the guard no longer judges a ~ path against its own home when the command sets a different one.

Known limits

  • Some safe commands are now refused, and each is declared in the guard's readiness reference or its decision record: a Trash call whose targets continue onto the next line, a quoted path that contains a space (the Finder delete is the remedy for a Trash move), a home-relative path on any line that names HOME, a commit message carried by a here-document inside a command substitution with a deletion word at a line start, and a continued line whose # opens no comment, which is read as if it ended one.
  • Some classes remain declared limits of the guard's design rather than gaps this release closes: text written to a file that a later step runs, a Python program read from standard input that hands text to a shell, a HOME name built through an expansion, an empty-the-Trash option carried with an inside target, and a command carried as a string for another shell to run.
  • Further gaps in what the guard covers, found during this release, are reported privately as the Security Policy describes and are not described here; the release's follow-up sweep, #9027, counts them.
  • A workspace picks up this release when an update refreshes its guard bundle. The version this workspace reports changes to v5.08 on the first update after this release closes.

Report issues at https://github.com/cody-hutson/pmo-platform/issues, and report a suspected vulnerability privately as the Security Policy describes.

Reversibility

MODERATE / MEDIUM. Reverting the single release merge restores the deletion guard as it was, and a workspace runs the restored guard only after an update refreshes its guard bundle; the version tag is kept as the record that the version was claimed. A revert reopens every gap this release closes.


Operator and engineering detail

The segment walk (#8122, ADR-239). core/hooks/block-rm-prefer-trash.sh no longer has an exit that allows a line on a match. A git segment exempts only itself, each rm-family verb is judged on its own segments, and a deletion or Trash segment that does not name all its targets on its line is refused under the strict policy. A line's continuation is read once per line, and a command's words are read past a redirection's ampersand, so every Trash target is judged or the call is refused, whichever redirection precedes the continuation. At the Stage 9 condition the continuation rule became comment-aware: the hook also reads the command after each continued line that carries a #. ADR-239 supersedes ADR-235's decision 3, the frozen view the removed exits read; ADR-235's other decisions stand, and the canonicalizer's code is unchanged.

The quoted-body reading (#7644). A private parser inside the hook removes a top-level quoted here-document body from the judged text only when its receiver is on a named list: cat, git commit or git tag after at most one -C <dir>, the built-in gh issue, gh pr, gh release and gh api, and python3 -. Every other receiver, a shell included, any enclosure in a command substitution, backtick or subshell, and any route to a program keep the body judged. git's edit option and zsh's definition tables decline the reading.

The target resolver (#8123). The keg-only Trash location is a Trash invocation. The target and the workspace root are compared in one normalized form, and a target that cannot be normalized is refused, never admitted. A target word that is not literal — a brace, a backslash, an inner quote, a quoted leading tilde, another tilde prefix or a zsh equals-word — is refused as unresolvable, and on a line that names HOME no home-relative word is expanded.

The differential. The release's declared verdict moves are named row by row in its two cross-issue criteria, one for refuse-to-allow moves and one for allow-to-refuse and rule-ID moves, and the suite differential is graded against them. At the Stage 9 GO the suites read 4222 passing and 0 failing across 25 suites, with 0 undeclared refuse-to-allow moves against main.

How it shipped. Three cards on one branch, built serially. After the scope lock, Stage 6 ran six fix-up passes returned from Stages 7 to 9, most of them on the line-continuation class. The Stage 9 GO carried one condition — the comment-continuation residual fixed in this release — which a re-verification confirmed before Stage 12. The release merged at 4e70b20f and claimed v5.08 with a signed annotated tag. Its decision record, claimed as 238 on the branch, was renumbered to ADR-239 before the merge because a sibling release had taken 238; its ratification is recorded in its own status field. The operator published the hook bundle through the targeted refresh, and both deployed files hash-equal the merged sources. Three comment-only corrections in a sibling release's files were handed to that release.

For full implementation detail see the Deployment Log v5.08 entry in the release log, and the release plan.

References