chore: sync standards configs#28
Merged
Merged
Conversation
melodic-standards-sync
Bot
force-pushed
the
chore/standards-sync
branch
from
July 7, 2026 03:23
fe8dc7f to
38868da
Compare
kyle-sexton
added a commit
that referenced
this pull request
Jul 20, 2026
…ss when git clean failed (#395) (#590) ## Summary `git-tree-reset.sh --apply` printed `AppliedClean: git clean -fdx …` **unconditionally**, regardless of whether `git clean` actually succeeded — a false success signal that misleads any operator or automation keying off that line to conclude the tree reached a known-good state. Scope note: the sibling `AppliedReset` false-success and the unresolvable-`@{u}` gate that issue #395 references were already closed by #460 (reset-failure aborts clean, exit 5) and #542 (upstream-unresolved block, exit 6). This PR fixes the one remaining unguarded case — `AppliedClean` — so #395's acceptance criteria are fully met. ## Fix - Capture `git clean -fdx`'s exit status (`CLEAN_RC`), read on the line immediately after the capture so `$?` isn't clobbered (the script runs `set -uo pipefail`, no `-e`). - Gate the `AppliedClean` success line on the real outcome. A non-zero clean exit whose cause is **locked/in-use files** is the expected non-fatal case — `git clean` returns non-zero when it fails to remove any path, and that case is already reported honestly via `Unremovable:` — so it is **not** treated as failure (avoids regressing the deliberate locked-file handling on Windows). Only a non-zero exit with **no** `failed to remove` warnings is a genuine failure: it emits an explicit `FAILED:` line, `AppliedClean: failed`, and exits **7** instead of a success line. - Emit the `AppliedReset:` success line as soon as `reset --hard` genuinely succeeds — **before** `clean` — so a subsequent clean failure still surfaces the truthful reset outcome rather than swallowing it. - Run the reparse-point restore guard on the failure path too (data-loss guard: a clean that errored mid-run may still have deleted tracked files first; safe because `reset --hard` ran first). - Documented exit 7 in the script header, `usage()`, and the `clean` skill's `context/git-tree-reset.md` gates list. ## Verification New test case #11 (`git-tree-reset.test.sh`) forces a genuine clean failure via a `PATH` shim that intercepts only `git clean` (delegating every other subcommand — crucially `reset` — to the real git, so the reset genuinely succeeds). The full suite passes, including the 6 new assertions: ``` PASS: [38] clean failure exits 7 PASS: [39] clean failure reports failure PASS: [40] clean failure emits AppliedClean: failed PASS: [41] clean failure emits no clean success line PASS: [42] clean failure still reports the successful reset PASS: [43] clean failure leaves untracked intact (clean did not silently succeed) OK: git-tree-reset.sh tests passed ``` (All 43 tests pass; the pre-existing reset-failure suite #22–27 and upstream-unresolved suite #28–37 continue to pass — no regression. `shellcheck` is clean on both files.) Live `--apply` run against a repo where `git clean` fails after a successful reset — the report is now honest and exits non-zero: ``` AppliedReset: git reset --hard main FAILED: git clean -fdx exited 1 (non-locked-file cause) — untracked removal incomplete; reset --hard already applied. fatal: simulated git clean failure AppliedClean: failed RestoredTracked: 0 EXIT=7 scratch.txt still present (clean did NOT silently succeed): YES ``` Before this fix the same run printed `AppliedClean: git clean -fdx` and exited `0`. Closes #395 ## Related - #395 — this PR. - #396 — sibling issue on the same script (dry-run does not validate `@{u}` upstream). **Not addressed here** to avoid a merge collision on the same lines; a separate cycle picks it up. 🤖 Generated with a Claude Code implementation subagent (issue #395) --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
kyle-sexton
added a commit
that referenced
this pull request
Jul 22, 2026
…e IV, flip pre-build (#939) Dated Phase-4 note: operator ruling (2026-07-22) to move at maximum speed within the predicate's intent. Calendar gates stay binding; sanctioned levers are front-loaded seeding (genuine items only), parallel Phase IV ignition (gate already met), and pre-built Phase III flip machinery. Records same-day watch activity: drain PRs #23/#24/#26 + Dependabot #25 merged in kyle-sexton/autonomy-demo-scratch, queue reseeded (scratch#27–#31), predicate completions=6. ## Related - kyle-sexton/autonomy-demo-scratch#27, #28, #29, #30, #31. No linked issue — status-note documentation; nothing in this repo closes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Automated by the standards Track-B sync from melodic-software/standards@d7561fa (ref main). Upstream is authoritative; review and merge, do not hand-edit these files downstream — change them upstream.