docs: R-302 — correcting R-300, the pathspec was not the fault
R-300 blamed `git add -A` foreead663carrying my uncommitted edits. check-figures' author checked and it was not that: they staged two exact paths. The tree agrees —eead663holds CLEAN_GROUND.md and CLEAN_GROUND_ART.md only, while my modified step5-split.mjs and untracked check-unmarked.mjs are absent, both of which `git add -A` would have taken. `git add <file>` takes the whole file including another session's edits to it, so a pathspec stops you sweeping files you did not touch and does nothing about the one you did. Their pre-commit `npm run check` passed because my uncommitted module was in the shared tree: the commit was broken, the working copy was not. I asserted a mechanism I never looked at, in an entry whose technical finding was correct. The correction came from the session it accused. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
e8faac73db
commit
e2a474b246
@@ -7363,3 +7363,39 @@ obvious, and two readers that disagree are how three of this session's defects w
|
|||||||
|
|
||||||
**State:** CLEAN GROUND v0.24, **22 guards**, 168 cited figures, artwork prompts written and
|
**State:** CLEAN GROUND v0.24, **22 guards**, 168 cited figures, artwork prompts written and
|
||||||
nothing generated. Still the only untested thing is a run with human beings.
|
nothing generated. Still the only untested thing is a run with human beings.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## R-302 — correcting R-300: the pathspec was not the fault
|
||||||
|
|
||||||
|
**R-300 says `eead663` swept my uncommitted edits in by `git add -A`. That is wrong, and the
|
||||||
|
truth is worse.** check-figures' author staged two exact paths, which is the rule this repo
|
||||||
|
has been following all session. I did not check before writing it down; they did, and then
|
||||||
|
told me. The tree agrees with them — `eead663` contains `CLEAN_GROUND.md` and
|
||||||
|
`CLEAN_GROUND_ART.md` and nothing else, while my modified `tools/step5-split.mjs` and
|
||||||
|
untracked `tools/check-unmarked.mjs` are absent from it. `git add -A` would have taken both.
|
||||||
|
|
||||||
|
**`git add <file>` takes the whole file, including the edits another session made to it.** Two
|
||||||
|
sessions had touched `CLEAN_GROUND.md`; eight of that commit's eleven hunks were mine. A
|
||||||
|
pathspec names a file, not a change, so **staging exact paths stops you sweeping files you did
|
||||||
|
not touch and does nothing about the file you did.**
|
||||||
|
|
||||||
|
**And the green build was green for the wrong reason.** `npm run check` passed for them before
|
||||||
|
committing, because my uncommitted `step5-split.mjs` was sitting in the shared tree. The
|
||||||
|
commit was broken; the working copy was not. That is this log's oldest theme arriving in the
|
||||||
|
build system itself — **a check that passes for a reason unrelated to what it claims** — and
|
||||||
|
it is the reason `check-cited` failed on a fresh clone of HEAD while passing for everyone who
|
||||||
|
had the file on disk.
|
||||||
|
|
||||||
|
**Two rules, both needed, neither sufficient alone:**
|
||||||
|
|
||||||
|
- **`git diff --cached` before committing.** The hazard is the file, not the pathspec, and the
|
||||||
|
staged diff is the only thing that shows what is actually going in.
|
||||||
|
- **Prove the commit standalone.** Clone HEAD into a tempdir and run the suite there, or
|
||||||
|
`git checkout-index -a --prefix=`. A green run in a shared working tree says nothing about
|
||||||
|
what you pushed, because the tree contains the thing the commit is missing.
|
||||||
|
|
||||||
|
**Worth recording that the correction came from the person it accused.** They reproduced my
|
||||||
|
finding before accepting it, repaired it in `e9f7d45`, then checked my account of their own
|
||||||
|
commit and found it wrong. R-300's technical claim stood; its account of how the breakage
|
||||||
|
happened did not, and I had asserted a mechanism I never looked at.
|
||||||
|
|||||||
Reference in New Issue
Block a user