Skip to content

feat(disk-hygiene): list a mount point's immediate children read-only - #10028

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/disk-hygiene-mount-children
Oct 25, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/disk-hygiene-mount-children

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Refs: #9572

Summary

This PR covers half of #9572: an audit of a tmpfs /tmp now reports its top-level entries. The other half, making /disk-hygiene:clean model-invocable, is not in this PR. A recorded owner decision blocks it, so this PR links the issue with Refs: and does not close it.

Why the clean flip is blocked. docs/conventions/invocation-mode/README.md, in "Re-grade: disk-hygiene:clean under the 2026-10-18 decision (#9706)", applies the owner's D3 rule from #6458: a destructive-capable skill becomes model-invocable only if every destructive step provably stops for a person, even in an unattended run. Its verdict is KEEP true. The Windows/macOS manual deletion lane and the opt-in elevated script have no deterministic stop, and handoff-apply has never been probed. #5609 is still open. Its 2026-10-24 Windows probe found a PowerShell delete that ran with no prompt after --resume, and #9853 tracks the fix for that as an open owner decision (options A, B and C). #9572 makes the flip conditional on #5609's open modes, so this PR leaves disable-model-invocation: true unchanged and does not work around the block.

Fix

  • scan --root-children now accepts a mount point that is not a volume root. It lists the mount's immediate children using the strict volume-root ladder: loose files are admitted, and hidden entries and nested mounts (nested-mount-point) are withheld. It sets mount_point_target: true, walks nothing, and writes no snapshot. Under --quiet, the full listing goes to the --output path and stdout carries only admitted_kinds and the withheld-reason counts.
  • A --root-child selection on a mount point is refused, with a message telling you to scan an admitted child directory as its own target. A child of /tmp is not a mount, so a plain scan of it already works. Without --root-children, the refusal of a mount-point target keeps its error text and now adds a hint that names the flag. A plain /disk-hygiene:audit /tmp still stops at that exit 2; /disk-hygiene:audit --root-children /tmp reports the top-level entries, with no SKILL.md change.
  • The deletion lanes stay closed. resolve_snapshot_target still refuses a mount-point target, and the --quiet listing file carries no snapshot schema, so preview rejects it. scan-flags.md, safety-model.md and the README describe the new shape. A .changes/disk-hygiene/ minor fragment is included.

Verification

  • New tests fail on main and pass here. test_root_children_lists_immediate_children_of_a_mount_point_target, test_quiet_mount_point_listing_goes_to_the_output_file and test_root_child_selection_on_a_mount_point_target_is_refused were red before the fix (exit 2, no hint). test_scan_rejects_non_root_mount_point was extended to assert the hint.
  • plugins/disk-hygiene/skills/clean/scripts/hygiene.test.sh: 722 tests, OK (2 skipped), after rebasing onto main. The skill-quality checker over plugins/disk-hygiene/skills passed 4 skills with 0 failed, and that run also ran every bundled script test. scripts/check-changelog-fragments.sh --check and scripts/run-ruff.sh check on the engine scripts both pass.
  • Live read-only run on this WSL host, where /tmp is a tmpfs mount: scan --target /tmp --root-children returned root-children-selection-required with mount_point_target: true, 25,572 admitted top-level entries (23,073 directories and 2,499 files) and 5 withheld (2 hidden, 3 non-regular). The os_autoclean advisory named systemd-tmpfiles.
  • Evals: no SKILL.md description or body changed, so per skill-criteria.md ("a description change re-measures triggering, a body change re-measures output") no model-graded eval is owed. None was run.
  • Left out:
    • The clean model-invocation flip (blocked, see Summary).
    • Running the cleanup on a schedule outside a session. That is out of scope, and it is the follow-up question below.
    • ruff format --check, which already fails on main for these files without this change.
    • The clean SKILL.md line "--quiet shapes the scan's stdout and nothing else" is not updated: for a mount-point listing --quiet also writes the --output file. Editing the body would owe a model-graded eval run, so scan-flags.md carries the detail instead.

Related

Follow-up question for the owner: should the /tmp cleanup run on a schedule outside a session? That needs a host-operations design (a schedule owner, an unattended deletion lane), and none exists yet, so nothing is built here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ALNPqVZStM4GRvFnkZgVjF

scan --root-children on a mount point that is not a volume root (a tmpfs
/tmp on WSL) now lists its immediate children under the strict ladder:
loose files admitted, nested mounts withheld, nothing walked, no snapshot
written. --quiet sends the full listing to --output. A --root-child
selection on a mount point is refused; scan an admitted child directory
as its own target. The plain mount-point refusal now carries a hint.

Refs: #9572

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ALNPqVZStM4GRvFnkZgVjF
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 25, 2026 14:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 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-10-25T14:20:36.965524Z b93cb1e 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 Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 69aa0f677f65ba075448d637c85569d3b6d977c7: 0 finding(s), 0 as inline comments.

Incremental review of plugins/disk-hygiene/README.md since b93cb1e. The only change is a wording edit in the "Not a replacement for telemetry" bullet. "The local record is the floor beneath it, for the ordinary case where no sink exists" became "The local record covers the ordinary case where no sink exists."

The edit is a docs-only rewording. It keeps the claim that HOOK_TELEMETRY_SINK behavior is unchanged and that the local record applies when no sink is configured. No code, manifest, or trusted-path files changed, so there is nothing to flag. This was a skip-gate item 3 outcome: trivial change, no meaningful review surface.

I read only the incremental diff. I did not re-review the other five files, which are unchanged since b93cb1e. The PR context file was not needed for this change. No hold applies, and no cost is incurred beyond the lane's normal run.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 69aa0f677f65ba075448d637c85569d3b6d977c7: 0 finding(s), 0 as inline comments.

No security findings. The incremental change since b93cb1e is one wording edit in plugins/disk-hygiene/README.md. It rewrites "The local record is the floor beneath it, for the ordinary case where no sink exists" as "The local record covers the ordinary case where no sink exists." The sentence before it, that a configured HOOK_TELEMETRY_SINK keeps receiving what it received before, is unchanged.

The edit is descriptive documentation. It doesn't delete, narrow, or soften a standing instruction, a rule, or a hook allowlist or block list. No code, manifest, or trusted-path file changed in this increment. So the instruction-surface lens finds nothing to compare against the exception register, and no manifest items apply.

I did not re-review the other five files. They are unchanged since b93cb1e and were reviewed then.

PR context: the description contains no embedded instructions aimed at the review lane.

critical-findings: 0

Lane-Activity: pr-refine/fix-docs
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit bd04955 Oct 25, 2026
35 checks passed
@kyle-sexton
kyle-sexton deleted the feat/disk-hygiene-mount-children branch October 25, 2026 14:35
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.

1 participant