fix(disk-hygiene): define "suspicious" for unhinted home-root entries - #869
Conversation
The clean skill's step 2 referenced "hinted or suspicious" entries but never said what made an unhinted entry suspicious, so agent-session droppings with no shared name shape (a status snapshot, a one-off export) were never triaged even though the scan snapshot already records every walked entry. Step 2 now instructs the model to treat any loose root-level entry at a user-home target that isn't in protected_exact_names and doesn't match a recognizable app/config convention as suspicious. baseline-policy.json is untouched: the tmp_* hint-glob gap this issue also reported already shipped in #286, and the remaining class has no common name shape to glob without fabricating a pattern the evidence doesn't support. Closes #287 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1V3gkrfSf75isB8MiDy3o
|
Claude finished @kyle-sexton's task in 2m 13s —— View job PR Review
SummaryThis is a guidance-only patch that closes the remaining open findings from #286/#287. No code executes differently — the change is entirely to the Two nits below; the rest is clean. Verified ClaimsThe PR's key empirical assertion holds: The decision to leave Findings🟡 Nit — "Recognizable app/config convention" is undefined and has no examples
For a skill that runs at a home-directory root (high-blast-radius target), a brief inline example set in the new paragraph — e.g., "dotfiles, dotdirs, XDG base-dir subdirectories ( 🟡 Nit — "User-home target" is not defined or anchored in SKILL.md The phrase "user-home target" appears only here. The model must infer from the invocation path whether it qualifies (e.g., What's Right
|
|
Claude finished @kyle-sexton's task in 1m 5s —— View job Security Review — PR #869
No security issues found in this PR. Scope reviewed: all three changed files —
The hook frontmatter in
|
|
Post-green review classification (work lane):
No DEFER-FORBIDDEN class applies — this is guidance-only prose; the destructive-action gates (preview, approval-token binding, per-tier Note: verified the actual comment content (not just the green CI check) before this classification — a sibling PR this cycle (#867) had a Flipping to ready, handing off to the babysit lane for ongoing watch. |
|
Claude finished @kyle-sexton's task in 1m 51s —— View job PR Review — #869
SummaryGuidance-only patch that closes the remaining open gap from #286/#287. No code execution changes — the entire delta is new prose in the Verified ClaimsThe PR's linchpin assertion holds: The decision to leave ObservationsParagraph insertion point is optimal. The new text sits between the "Loose root-level entry" scoping is consistent. Step 1 already establishes that large roots like home directories start with "User-home target" has implicit context. "Recognizable app/config convention" is the main variance point. Standard dotfiles ( Version bump and CHANGELOG are correct. Guidance-only change → Bottom LineNo new issues beyond the two nits the prior review already surfaced. Both nits are bounded in practice by the downstream approval gates — a wrongly-flagged |
|
Claude finished @kyle-sexton's task in 1m 3s —— View job Security Review — PR #869
No security issues found in this PR. Scope reviewed: all three changed files —
The hook frontmatter in
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f63569e879
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
This was generated by AI (decide lane — decision-brief pass; parked PR-thread decision surfaced via periodic scan). Decision brief — how to define the app/config exclusion in the Problem. This PR adds a home-target exclusion — an entry is not triaged if it "does not belong to a recognizable app/config convention" ( Today. The exclusion is a free-text heuristic judged by the model at runtime. The only concrete exclusion in the skill is Why the risk is asymmetric (the spine). This is a destructive-adjacent flow, but deletion is gated: §3 tiers (
Options.
A hybrid of 1+2 (provenance test as the rule, Cross-links (same-family prior decisions).
No ruling — deferred to the PR author. RECOMMENDED marked per brief convention. |
Summary
Closes the two gaps #286 left open from issue #287: the
cleanskill's step 2 said to inspect"hinted or suspicious" entries but never defined "suspicious" for an entry with no hint, so
unhinted agent-session droppings at a home-directory root (a status snapshot, a one-off export)
were never triaged even though the scan snapshot already records every walked entry.
Fix
plugins/disk-hygiene/skills/clean/SKILL.md§2: added a paragraph defining "suspicious" fora user-home target — any loose root-level entry not in
protected_exact_namesand notmatching a recognizable app/config convention. This single guidance addition realizes both of
fix(disk-hygiene): unblock guarded engine lane and bounded large-root audits #286's open findings (the undefined "suspicious" criteria, and the agent-session status-file
heuristic) since they're the same positional gap: the engine already snapshots every walked
entry with a possibly-empty
hintslist, so the data was always available, just never actedon.
plugins/disk-hygiene/skills/clean/reference/baseline-policy.jsonis intentionallyuntouched. The issue's
tmp_*hint-glob gap already shipped in fix(disk-hygiene): unblock guarded engine lane and bounded large-root audits #286/v0.3.0. The remainingclass of entries (
melo-lap-001-*.json,org_usage.json) shares no common name shape — theissue itself calls a generic glob "admittedly hard" — so adding a baseline-policy.json pattern
here would mean fabricating a naming convention the evidence doesn't support. The positional
SKILL.md guidance is the mechanism the issue's own notes suggest as the alternative.
plugins/disk-hygiene/.claude-plugin/plugin.json0.4.1 → 0.4.2 and added a matchingCHANGELOG entry.
Verification
hygiene.py's snapshot walk(
scripts/hygiene.py:608-615) appends every walked entry with"hints": matching_hints(...)(possibly empty), not just hinted ones — so the new guidance has real data to act on.
bash scripts/check-changed-skills.sh origin/main— PASS,0 errors (SKILL.md 235/500 lines, well under the hard cap; only a pre-existing soft
line-count WARN, unrelated to this change).
Closes #287
Related
tmp_*/scratch*baseline-policy.json hints and explicitly scoped thisissue's remaining two findings as open; this PR closes them.