Summary
git-tree-reset.sh --apply prints AppliedReset: and AppliedClean: success lines unconditionally, regardless of whether the underlying git commands succeeded. The report claims success on failure.
Component
plugins/repo-hygiene/skills/clean/scripts/git-tree-reset.sh.
Root cause
184 git reset --hard "$UPSTREAM"
187 CLEAN_STDERR="$(git clean -fdx "${PRESERVE_ARGS[@]}" 2>&1 >/dev/null)"
...
192 printf 'AppliedReset: git reset --hard %s\n' "$UPSTREAM"
193 printf 'AppliedClean: git clean -fdx%s\n' ...
Lines 192–193 run even when line 184 emitted a fatal: and did nothing. The output describes the intended commands, not the actual outcome.
Evidence (this session)
Repos where the reset failed with fatal: ambiguous argument '@{u}' nonetheless printed:
AppliedReset: git reset --hard @{u}
AppliedClean: git clean -fdx (+1 preserve excludes)
An operator parsing this output (or an agent driving the script) reasonably concludes both steps succeeded — they did not (reset failed; clean ran anyway).
Impact
Silent success-on-failure. Any automation that keys off AppliedReset:/AppliedClean: to decide the repo is at a known-good state is misled. Undermines trust in the tool's own reporting.
Expected
The Applied* lines reflect real exit status: emit them only on success; on failure emit an explicit failure/Blocked: line with the captured error.
Acceptance criteria
Summary
git-tree-reset.sh --applyprintsAppliedReset:andAppliedClean:success lines unconditionally, regardless of whether the underlying git commands succeeded. The report claims success on failure.Component
plugins/repo-hygiene/skills/clean/scripts/git-tree-reset.sh.Root cause
Lines 192–193 run even when line 184 emitted a
fatal:and did nothing. The output describes the intended commands, not the actual outcome.Evidence (this session)
Repos where the reset failed with
fatal: ambiguous argument '@{u}'nonetheless printed:An operator parsing this output (or an agent driving the script) reasonably concludes both steps succeeded — they did not (reset failed; clean ran anyway).
Impact
Silent success-on-failure. Any automation that keys off
AppliedReset:/AppliedClean:to decide the repo is at a known-good state is misled. Undermines trust in the tool's own reporting.Expected
The Applied* lines reflect real exit status: emit them only on success; on failure emit an explicit failure/
Blocked:line with the captured error.Acceptance criteria
Applied*print on the actual exit code of its command.