Skip to content

disk-hygiene: throwaway local repos cannot be cleared, so they get deleted with no checks #4227

Description

@kyle-sexton

Problem

When the operator explicitly wants a contested VCS directory removed, the engine has no lane for it. In this session the model deleted such directories outside the engine on the operator's instruction, which skipped every identity, reparse, handle, and descendant check.

Session: Windows 11 Pro 10.0.26200, Claude Code 2.1.278, auto mode, disk-hygiene 0.23.12.

  • A --max-depth 5 rescan of the home directory marked cdtest and cdtest-cov as contested with vcs-metadata plus baseline-protected-name. Both are throwaway local git repositories with no remote; one had zero commits.
  • The final 3 contested directories and 4 more approved paths were deleted by the model outside the engine, because the engine offered no path to clear them.

The categorical refusal did not prevent the deletion. It only removed the safety checks from it.

Root cause

The VCS evidence mode cannot clear these repositories:

  • Gate 1 requires empty porcelain including untracked files, so a zero-commit repository holding files fails.
  • Gate 2 requires a github.com remote unless the repository is unborn.
  • Both limits: reference/unsupported-platform-handoff.md lines 74-82 and safety-model.md lines 148-158.

Related: #4007 (same argument: without an engine lane, the deletion happens anyway with fewer checks).

Proposed fix

Cheapest first:

  1. Skill text: when the operator overrides a contested VCS verdict, still run handoff-verify and require every non-VCS reason to be absent. Tell the operator plainly that unpushed or untracked content will be lost.
  2. Add a per-path operator acknowledgement to vcs-evidence.json, for example "accept_unpublished": true with a reason. It relaxes only gates 1 and 2 for that exact approved path and is recorded in the verdict. Link, mount, handle, and identity checks stay categorical.

Acceptance criteria

  • A local git repository with no remote and untracked files can be verified clear when the operator records accept_unpublished with a reason for that exact path.
  • The acknowledgement does not relax link, mount, handle, or identity checks; a repository that fails any of them stays contested.
  • The acknowledgement and reason appear in the verdict output.
  • Without the acknowledgement, the verdict is unchanged from today.
  • The skill text tells the model to run handoff-verify before any operator-overridden VCS deletion and to warn that unpushed or untracked content will be lost.

Found by /plugin-quality:audit (run 20260919T170952Z).

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Sep 19, 2026
  2. added
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Sep 23, 2026
  3. kyle-sexton commented on Sep 23, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Human-gated. Open decision: whether an operator acknowledgement may relax the categorical VCS gates 1-2 at reference/safety-model.md:148-158 (empty-porcelain and github.com-remote-confirmed)

  4. kyle-sexton commented on Sep 28, 2026

    @kyle-sexton
    MemberAuthor

    Decision: add the accept_unpublished lane (this issue's proposed fix)

    The operator delegated this call on 2026-09-28; this is the recorded answer.

    An operator acknowledgement may relax VCS gates 1 and 2 (empty porcelain, github.com remote confirmed), and nothing else, for one exact approved path. Implement both proposed fixes and the acceptance criteria above as written:

    1. The skill text requires handoff-verify before any operator-overridden VCS deletion, and requires telling the operator that unpushed or untracked content will be lost.
    2. A per-path "accept_unpublished": true with a reason in vcs-evidence.json. It relaxes only gates 1 and 2, appears in the verdict output, and leaves link, mount, handle, and identity checks categorical.

    Why: the session in this issue showed that refusing categorically does not stop the deletion. The operator still wants the directory gone, so it gets deleted outside the engine with every check skipped. A narrow, recorded, in-engine lane keeps the other checks in force for exactly the case that happens anyway.

    #4936 goes the other direction: it forbids out-of-engine removal and records "Option A" as decided, which was not decided. Rework it to implement this lane, or close it in favour of a new PR that does.

  5. removed
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    on Sep 28, 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

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions