Skip to content

docs(repo-hygiene): git-tree-reset context doc omits reset --hard non-atomicity caveat (exit 5) #485

Description

@kyle-sexton

Summary

Deferred doc-completeness follow-up from PR #460 (fixes #394).

plugins/repo-hygiene/skills/clean/context/git-tree-reset.md:39 currently reads:

Aborts the apply if reset --hard fails (exit 5) — clean and the restore guard never run, so a failed reset can never leave the tree cleaned but not reset.

This sentence is accurate — it describes the gating contract the script enforces (git-tree-reset.sh:190-195): on a failed reset --hard, clean and the restore guard are skipped, so the tree is never left cleaned-but-not-reset.

However, it is now slightly incomplete relative to the stderr failure message added in 745def6, which correctly surfaces that reset --hard is not atomic and may have partially modified tracked files before it failed. A caller reading only the context doc (not the stderr output) would not know to expect partial tracked-file modification after exit 5.

Suggested change

Add a parenthetical to line 39, e.g. (the reset itself may have partially modified tracked files), so the doc is consistent with the stderr message.

Why deferred rather than fixed in #460

PR #460 was at a converged, merge-ready head SHA (745def6, all checks green, reviewers converged). The reviewer (claude[bot]) explicitly marked this item "no action required / no code changes warranted / not a blocker / cosmetic." Pushing a one-line doc edit would move head off the ready SHA and re-trigger a full review cycle on an otherwise-done PR. Tracked here instead to preserve the merge-ready state.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions