You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(disk-hygiene): engine gate denies commands that only mention the engine file name #6242
The disk-hygiene engine gate (plugins/disk-hygiene/skills/clean/scripts/destructive_guard.py) denies read-only commands that only name the engine file hygiene.py. #5519 / #5521 and #4218 relaxed it for git show, git grep, grep and rg; other read-only readers (awk, sed -n, cat) are still denied. During the #6225 audit, two read-only auditor calls were denied this way: an awk that named the engine and contained #, and a read of the engine by name.
Filing this issue reproduced it: gh issue create --title "...only name hygiene.py" --body-file … was denied as an engine invocation because the title named the engine file and the command held a (. The 2,500-character deny text it returned is the one #6225 shortens.
Expected
A read-only inspection of the engine file is allowed; only invocations of the engine are gated.
Thanks for the clear writeup and reproduction. Understood: destructive_guard.py's engine gate still denies read-only commands (awk, sed -n, cat, and even a gh issue create whose title/body merely names hygiene.py) even though #5519 and #4218 already relaxed it for git show, git grep, grep, and rg. The ask is for the gate to key off actual engine invocation rather than any text mention of the filename, discovered during the #6225 audit.
No open issue duplicates this — #5519 and #4218 cover the earlier, narrower relaxations and are both closed, and #3950 (closed) covered a related but distinct watchdog false-closed case. This reads as a follow-up gap in the same gate rather than a dupe.
Owner decision (2026-10-13): approved the recommendation.
How far should the gate relax for commands that only mention the engine file? → Add a Bash counterpart of the PowerShell string-data rule, with three limits. (1) One simple command with no unquoted operator, so pipelines stay fail-closed. (2) The command word is on a closed reader allowlist: cat, head, tail, wc, grep, rg without --pre, git show/log/diff/grep without -c, -O/--open-files-in-pager or an alias, and gh issue/pr subcommands. (3) Only single-quoted literals, and double-quoted literals with no $ or backtick, are blanked as data. Identity is checked on the command as written before any blanking, so a resolving path to the engine still gates (disk-hygiene: the "provably a different file" escape added in #1640 lets the plugin's own stale engines bypass the kill switch #1805). awk and sed stay classified as written. Name the gh alias residual (--shell or !) in the docstring.
Basis: origin/main plugins/disk-hygiene/skills/clean/scripts/destructive_guard.py:789-843, :945-960, :195-202; https://pubs.opengroup.org/onlinepubs/9799919799/utilities/awk.html; https://www.gnu.org/software/sed/manual/html_node/Extended-Commands.html
May a pipeline of readers count as a mention? → Not in this change. Ask for it separately if git show | grep denials keep recurring.
Basis: destructive_guard.py:797-800, :878-880
This fixes the reported gh issue create denial. It does not fix the awk denial or a cat of the real engine through a resolving path; use the Read and Grep tools for those.
Next: an agent lane, via admission, implements it with red-first tests; it relaxes a guard, so a human merges it.
Owner ratified this admission in an attended session on 2026-10-13: work-class: scoped. It touches a guard, CI script, settings or trust surface, so an agent may build it but the owner merges the PR: put 'Hold: a human merges this' in the PR body.
Question: How far should the disk-hygiene engine gate relax for a Bash command that only mentions the engine file as quoted data?
Owner's answer: Add a Bash counterpart of the PowerShell string-data rule, limited to one simple command on a closed reader allowlist and blanking only safe literals, with identity checked before blanking. A pipeline of readers still does not count as a mention.
The owner confirmed this decision, first recorded at #6242 (comment), in an attended backlog-shaping session on 2026-10-18. The question was "Confirm the 10 decisions, #7287's kill-switch hardening included, and admit them to the paced queue?" and the owner answered "Yes, all 10 (Recommended)".
Posted by AI from the owner's answer in that session.
Type: Bug Summary: Let the disk-hygiene engine gate allow a simple reader command that only mentions the engine file as quoted data.
Current behavior:
The engine gate denies a command that names the engine file in its text, for example a gh issue create whose title names it, unless the command is one of the few readers already relaxed. Only PowerShell has a rule that blanks quoted string data.
Desired behavior:
The Bash path gains a counterpart of the PowerShell string-data rule with three limits: (1) one simple command with no unquoted operator, so pipelines stay fail-closed; (2) the command word is on a closed reader allowlist: cat, head, tail, wc, grep, rg without --pre, git show/log/diff/grep without -c, -O/--open-files-in-pager or an alias, and gh issue/pr subcommands; (3) only single-quoted literals, and double-quoted literals with no $ or backtick, are blanked as data.
Identity is checked on the command as written before any blanking, so a resolving path to the engine still gates.
awk and sed stay classified as written.
The docstring names the gh alias residual (--shell or !).
Key interfaces:
Engine gate's Bash classification: new string-data blanking under the three limits.
Acceptance criteria:
A stay-quiet test, red before the fix: gh issue create --title '...hygiene.py...' is allowed.
Tests: a pipeline that mentions the engine, a reader outside the allowlist, a double-quoted literal holding $, and a path that resolves to the engine each stay denied.
scripts/run-test-file.sh passes on the guard's test file.
A changelog entry or fragment for disk-hygiene passes scripts/check-changelog-fragments.sh.
Activity
github-actions commentedon Oct 4, 2026
Thanks for the clear writeup and reproduction. Understood:
destructive_guard.py's engine gate still denies read-only commands (awk,sed -n,cat, and even agh issue createwhose title/body merely nameshygiene.py) even though #5519 and #4218 already relaxed it forgit show,git grep,grep, andrg. The ask is for the gate to key off actual engine invocation rather than any text mention of the filename, discovered during the #6225 audit.No open issue duplicates this — #5519 and #4218 cover the earlier, narrower relaxations and are both closed, and #3950 (closed) covered a related but distinct watchdog false-closed case. This reads as a follow-up gap in the same gate rather than a dupe.
No fix or timeline implied here — just triage.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 13, 2026
Owner decision (2026-10-13): approved the recommendation.
$or backtick, are blanked as data. Identity is checked on the command as written before any blanking, so a resolving path to the engine still gates (disk-hygiene: the "provably a different file" escape added in #1640 lets the plugin's own stale engines bypass the kill switch #1805). awk and sed stay classified as written. Name the gh alias residual (--shell or!) in the docstring.Basis: origin/main plugins/disk-hygiene/skills/clean/scripts/destructive_guard.py:789-843, :945-960, :195-202; https://pubs.opengroup.org/onlinepubs/9799919799/utilities/awk.html; https://www.gnu.org/software/sed/manual/html_node/Extended-Commands.html
git show | grepdenials keep recurring.Basis: destructive_guard.py:797-800, :878-880
This fixes the reported
gh issue createdenial. It does not fix the awk denial or a cat of the real engine through a resolving path; use the Read and Grep tools for those.Next: an agent lane, via admission, implements it with red-first tests; it relaxes a guard, so a human merges it.
This was generated by AI.
kyle-sexton commentedon Oct 13, 2026
Owner ratified this admission in an attended session on 2026-10-13: work-class: scoped. It touches a guard, CI script, settings or trust surface, so an agent may build it but the owner merges the PR: put 'Hold: a human merges this' in the PR body.
kyle-sexton commentedon Oct 18, 2026
Decision recorded.
Question: How far should the disk-hygiene engine gate relax for a Bash command that only mentions the engine file as quoted data?
Owner's answer: Add a Bash counterpart of the PowerShell string-data rule, limited to one simple command on a closed reader allowlist and blanking only safe literals, with identity checked before blanking. A pipeline of readers still does not count as a mention.
The owner confirmed this decision, first recorded at #6242 (comment), in an attended backlog-shaping session on 2026-10-18. The question was "Confirm the 10 decisions, #7287's kill-switch hardening included, and admit them to the paced queue?" and the owner answered "Yes, all 10 (Recommended)".
Posted by AI from the owner's answer in that session.
kyle-sexton commentedon Oct 18, 2026
Agent Brief
Type: Bug
Summary: Let the disk-hygiene engine gate allow a simple reader command that only mentions the engine file as quoted data.
Current behavior:
The engine gate denies a command that names the engine file in its text, for example a
gh issue createwhose title names it, unless the command is one of the few readers already relaxed. Only PowerShell has a rule that blanks quoted string data.Desired behavior:
$or backtick, are blanked as data.!).Key interfaces:
Acceptance criteria:
gh issue create --title '...hygiene.py...'is allowed.$, and a path that resolves to the engine each stay denied.scripts/run-test-file.shpasses on the guard's test file.scripts/check-changelog-fragments.sh.Out of scope:
This was generated by AI during backlog shaping. The owner approved its admission in an attended backlog-shaping session on 2026-10-18.