Skip to content

docs(hook-budget): record the Windows probe of the disk-hygiene PowerShell block row - #12465

Merged
kyle-sexton merged 2 commits into
mainfrom
host-run/9989-powershell-probe
Nov 2, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
host-run/9989-powershell-probe

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #9989
Refs: #6755

Summary

Records the last open probe for #9989: the disk-hygiene PreToolUse PowerShell(*hygiene.py*) row, which sets onFailure: "block". WSL sessions have no PowerShell tool, so #11747 left this row unprobed; it now ran on the same host's Windows side.

Fix

Updates the PowerShell(*hygiene.py*) row and the closing sentence of the adopted-row probes section in docs/contracts/hook-budget/README.md.

Verification

Windows Claude Code 2.1.316, claude -p --plugin-dir <copy of plugins/disk-hygiene> --setting-sources project,local --strict-mcp-config --permission-mode dontAsk --allowedTools PowerShell, run from an empty working directory. The init event lists the PowerShell tool and only the probed disk-hygiene copy among non-builtin plugins.

  • Block arm (node directories removed from PATH, where.exe node finds none): the call Write-Output 'probe names hygiene.py' was denied with failed; blocking because onFailure is "block" and Executable not found in $PATH: "node".
  • Control arm (node present): the same call ran and returned its output; the session's guard-launch marker shows the guard launched.
  • An engine inventory call through PowerShell with node present is denied by the guard's own verdict (engine calls must use the Bash lane), so it cannot be the control.
  • scripts/check-affected.sh --tests on the committed head: 12 passed, 4 skipped. scripts/check-changelog-fragments.sh --check-required origin/main exits 0 (no plugin changed).

Related

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T19:34:55.549406Z 66ca789 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 66ca789227dffc13bd2c606fe5821f9a5ddcc983: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read the whole change. The pull request edits one file, docs/contracts/hook-budget/README.md, which is documentation only.

What changed. The PowerShell(*hygiene.py*) row in the adopted-row probes table now says "probed", where it used to say "not probed". The closing paragraph now gives the Windows probe conditions: Claude Code 2.1.316, --setting-sources project,local, node removed from PATH for the block arm, and a string-only control call. It also says why an engine call through PowerShell can't be the control.

Checks:

  • Trusted paths and trust controls. The file matches none of the listed trusted-path globs. It touches no trust control: no trusted-actor list, token scope, kill switch, merge hold or .github/actions/ code.
  • Instruction surface. The file is a contract page that records probe results. It is not a standing instruction such as CLAUDE.md, AGENTS.md, a rules file, a skill or agent body, or a hook allowlist. Nothing in it removes or softens a guardrail. The onFailure: "block" behavior it describes lives in plugin hook configuration, and this pull request doesn't change that.
  • Plugin manifests. None changed.
  • Secrets and data. The diff exposes no credentials, tokens or host-specific secrets. It names only a client version and generic commands.
  • PR context. The description and the comments on the closing issue contain no embedded directives aimed at this lane.
  • Prior findings. Zero earlier rounds, cap 3, not past the cap. The cap doesn't apply.
  • Spend. None. This is documentation only, with no change to lanes, schedules or billing.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 66ca789227dffc13bd2c606fe5821f9a5ddcc983: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read the whole change. It edits one file, docs/contracts/hook-budget/README.md, which is not a trusted path. The change replaces the disk-hygiene PowerShell(*hygiene.py*) row, which said "not probed", with a probe run on Windows. It adds a paragraph on how that run was set up and removes the old "still needs a probe on a Windows host" sentence.

Checked against the code

  • plugins/disk-hygiene/hooks/hooks.json has the row the PR describes: "if": "PowerShell(*hygiene.py*)" with "onFailure": "block".
  • The page says the guard itself denies an engine call made through PowerShell even when node is present. That matches destructive_guard.py, which returns "disk-hygiene engine invocations must go through the Bash tool's exact guarded command shapes, not PowerShell" (destructive_guard.py#L2321-L2326). The comment above that code says a script name that only appears inside string data is let through. So it makes sense that the control call, Write-Output 'probe names hygiene.py', runs when node is present.

Closing issue #9989, Done-when items

  • One block probe and one control call per adopted row, with the client version: met. The last open row now has both results and names Claude Code 2.1.316. The other rows were recorded in docs(hook-budget): record probes of each adopted onFailure block row #11747. The probe results themselves come from the author and I did not reproduce them; this lane has no shell.
  • Results in a section of the hook-budget page, PR carrying Refs: #6755: met. The section is on the contract page; an issue comment explains the conventions page now just links there. The PR body has Refs: #6755.
  • check-changelog-fragments.sh --check-required origin/main exits 0: the author says so. I did not run it. No plugin file changes, so no fragment is needed.
  • No test could fail if these items broke, but they record host-run evidence rather than code behavior, so a test is not the right guard here. I am not counting this as a finding.

Minor, not counted: the section intro (line 330) still says every session ran "on WSL2 Linux" with PATH=/usr/bin:/bin. The new paragraph right below the table covers the Windows exception, so readers are not misled. The last line of the closing paragraph is longer than the page's usual line width.

Path rules: .claude/rules/cost-claims.md applies to docs/**/*.md. The change makes no cost claims. The PR context contains no embedded instructions aimed at this lane.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit dece6cb Nov 2, 2026
91 of 95 checks passed
@kyle-sexton
kyle-sexton deleted the host-run/9989-powershell-probe branch November 2, 2026 20:16
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.

probe: each adopted onFailure row blocks on a missing command and passes a normal call

1 participant