Skip to content

disk-hygiene: Linux/WSL gaps (no hint for Windows device-name files such as nul, Linux os_autoclean null unexplained) #5216

Closed

Description

@kyle-sexton

Found while running disk-hygiene and repo-hygiene over a whole WSL machine from an orchestrating session with subagents.

Problem

Two small gaps showed up when /disk-hygiene:clean audited a WSL home directory. Neither is a safety problem, but both leave the operator without guidance the skill gives on Windows.

1. No hint for Windows device-name files on a Linux filesystem

On WSL, running a Windows-style > nul redirection from a Linux shell creates a real 0-byte file named nul in the working directory. A depth-1 home scan inventoried /home/kyle/nul (0 bytes, kind: file) with hints: []. It shows up only in empty_file_count. skills/clean/reference/baseline-policy.json has no rule for Windows reserved device names, so the report does not name this file as the leftover it almost certainly is.

Repro: in a WSL shell, run echo x > nul in a home directory, then run a scan of that directory with --max-depth 1. The entry carries no hint.

Desired behavior: a baseline hint that flags a regular file whose name is a Windows reserved device name (nul, con, prn, aux, com1-com9, lpt1-lpt9, any case, with or without an extension) on a non-Windows filesystem as a likely redirection artifact. The confidence ceiling would stay low or medium, as for other temp-file hints.

2. os_autoclean with recommendation: null is explained only for Windows

On Linux the engine's os_autoclean advisory reports mechanism: systemd-tmpfiles and sets recommendation to null whenever any of /etc/tmpfiles.d, /run/tmpfiles.d or /usr/lib/tmpfiles.d exists (the Linux branch of the advisory in skills/clean/scripts/hygiene.py, around lines 1459-1472 on main). SKILL.md explains a null recommendation only for Windows Storage Sense ("A null recommendation with a complete measurement means the zone is below the threshold"). On Linux, null means something different: tmpfiles.d configuration was found, so the temp zone is assumed to be aged out by the OS. A reader of the Linux output has no way to know that.

Desired behavior: one sentence in SKILL.md next to the Windows explanation, saying that on Linux a null recommendation means tmpfiles.d configuration is present and the zone is left to systemd-tmpfiles.

Evidence

  • Installed version 0.28.13; origin/main (0.28.14) has the same behavior.
  • Snapshot of /home/kyle at --max-depth 1: the nul entry has logical_size: 0, hints: [].
  • baseline-policy.json contains no device-name pattern.

Activity

  1. added
    needs-triage
    on Sep 29, 2026
  2. kyle-sexton commented on Sep 29, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Agent Brief

    Type: Task
    Summary: disk-hygiene hints Windows device-name files on Linux and explains a null os_autoclean on Linux.

    Current behavior:
    The baseline policy has no rule for regular files named after Windows reserved devices (e.g. nul left by a Windows tool on a WSL mount). The skill explains a null os_autoclean only for Windows.

    Desired behavior:
    A baseline hint flags regular files named nul, con, prn, aux, com1-9, lpt1-9 (any case, optional extension) on non-Windows, ceiling low/medium. The skill says that on Linux null means a tmpfiles.d config exists and the zone is left to systemd-tmpfiles.

    Acceptance criteria:

    • A test covers the device-name hint.
    • The skill documents the Linux meaning of null.
  3. added
    agent-ready
    and removed
    needs-triage
    on Sep 29, 2026
  4. added theissue type on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-ready

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions