operational-rigor §2: the two-dot ADDITION side over-reports unlanded work (stacked on #220) - #225
operational-rigor §2: the two-dot ADDITION side over-reports unlanded work (stacked on #220)#225firaen22 wants to merge 6 commits into
Conversation
Probed the two git bullets against throwaway repos (git 2.50.1) after a two-family prose review returned findings but ran nothing. - `git worktree prune` DOES drop the admin entry when the directory is present and only the `.git` pointer file is gone, and it closes the `git worktree repair` recovery. The old parenthetical said the opposite. - `git diff $(git merge-base A B) B` is not a merge preview: it is the three-dot form the same rule rejects, it collapses to a working-tree diff on unrelated histories, and it misses a rename-induced conflict. `git merge-tree --write-tree` is the preview. - `format-patch` + `am` does not materialize the two-dot deletions. Also: qualify "survives" for renames, and make `--show-toplevel` a comparison rather than a read. Markers narrowed to unprobed-shape. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reproduced all three against fixtures before applying: - a force-push updates a ref and leaves the pushing tree untouched, so it is not in the materializing set - `merge-tree --write-tree` writes and prints a tree even on conflict and exits 1, so read its output rather than gating on status (codex's proposed "reports conflicts and fails" would itself be false) - prune spares LOCKED worktrees; `repair` works off the admin entry, which is why prune ends it Provenance trimmed to fixture results, per the same review. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ch form, merge-tree exit contract, teardown error strings
|
Landed via owner-curated replacement — closing without merge (this repo's consolidation convention). Your six-commit head ( Landed = your current semantics + exactly two declared corrections, machine-verified against your frozen diff:
Your review-history honesty (the packet-truncation note, the prose-review-ran-nothing record) is preserved in the landed provenance — it is why this family required a first-hand execution gate rather than a prose vote, and the landed text is stronger for it. The incident shapes and the squash/empty-two-dot clauses remain Thank you — refuting shipped doctrine with runnable fixtures, then refuting your own first revision's addition-side claim, is the highest-value contribution pattern this repo has seen. |
Stacked on #220 — base is that branch, not
main. See "Why this is stacked" below; merging it againstmainwould silently lose it.The claim
Those two are offered as interchangeable. They are not, and the addition side is wrong in exactly the way this same bullet already warns about for the deletion side.
Fixture
merge-base has
config.txt = v1. Branch addsfeatwork.txtand never touchesconfig.txt. Base then moves on:config.txt = v2.+workis genuine unlanded work.+v1is not — it is the branch's older copy ofconfig.txt, and deleting the branch loses nothing there. The two-dot addition side over-reports, by the same mechanism that makes the deletion side inconclusive: the base moved on.git log <base>..<branch>and the three-dot diff both report only the real work.Fix
Route the delete read to
git log <base>..<branch>orgit diff <base>...<branch>, and say plainly that the addition side is inconclusive for the same reason the deletion side is. Recorded as Provenance result (11).Why this is stacked on #220
#220 rewrites this paragraph. I first branched this fix from
mainand tested the interaction:A clean merge, exit 0, no conflict — and the fix is gone. #220 replaces the whole hunk, so git takes its side wholesale and discards the edit made against the old text. Basing this on
mainwould have produced a merged result that silently kept the defect.So it is stacked. Merge #220 first, then this. If you would rather have it folded into #220 as a fifth commit, say so and I will move it.
Provenance / attribution
Raised by a
gpt-5.6-lunareviewer during #220's round-2 review, where I classified itpre-existing-trackedand deferred it out of scope rather than widening that change. This is the spun-off fix. The reviewer identified the imprecision; the fixture, the mechanism, and the wording are mine.Checks
python3 .github/checks.py— all checks passed. No added line exceeds §2's 74-column norm.Round 5 — dual review of this PR
Both families reviewed it; both returned FIX and converged on the Provenance contradiction. Every finding reproduced before it was applied.
git logand the three-dot diff are complementary, not interchangeable. My first wording offered them as alternatives ("read that off X or Y"). Fixture: a commit plus its revert leavesgit log main..featlisting two commits whilegit diff main...featis empty — deleting that branch loses no content at all. The text now separates them: log enumerates unique COMMITS, three-dot shows net CONTENT since the merge-base.git logtoo. Fixture:git log main...feat(three dots, symmetric difference) lists the base-side commit as well — recreating the exact over-report this PR exists to stop. The rule now names<base>..<branch>(or^<base> <branch>) and warns against the three-dot log form. Recorded as result (12).Coverage note
One reviewer flagged that my own packet file was truncated mid-result-(7), so Provenance results (8)–(10) were not in front of either reviewer. Confirmed — my extraction window cut them. Those three results are unreviewed, not cleared. They are fixture-backed (round 4) but no second lens has seen them.