Found while implementing #9902 (PR #10506), which guarded section 4 of the same script. Filing rather than widening that PR: this is a different sub-class (unwindowed path history with a fallback, not a windowed date question), and it is latent rather than measured damage.
The site
scripts/collect-release-notes.sh, section 2 — printing the body of each changeset the release consumed:
git show "$(git log --diff-filter=D --pretty=%H -1 "${NEW_REF}" -- "$f")~1:$f"2>/dev/null \
|| git show "${PREV_REF}:${f}"The inner git log -- <path> walks history with no range bound, so in a shallow clone it stops at the graft. If the commit that deleted the changeset sits below the floor, the substitution is empty, the git show "~1:..." that wraps it fails, 2>/dev/null eats the error, and the || fallback prints ${PREV_REF}:${f} instead.
Why it is worth a line
The fallback is not obviously wrong — for a changeset added before PREV_REF and never edited, the two copies are identical, which is presumably why it was written. It is wrong exactly when the changeset was edited during the dev cycle: the release page is then written from the pre-edit prose, and nothing in the output says which copy was printed. Same shape as the rest of this family — a real, plausible answer with no signal attached.
Bounded today: the file list feeding this loop comes from a PREV_REF..NEW_REF walk that is itself truncated in the same clone, so the loop is likely short before it is wrong.
Possible repair
Say which copy was printed, or refuse — the horizon predicate is already in the file after PR #10506 (cloud_window_guard calls scripts/pm/git-history.mjs), so the machinery is there. Deliberately not done in PR #10506: its subject was the windowed class, and widening a release-time script on a latent case is how a scoped PR stops being reviewable.
Related
#9902 · PR #10506 · #9450 (the range-question sibling: an endpoint that resolves does not make the range walkable)
Generated by Claude Code
Found while implementing #9902 (PR #10506), which guarded section 4 of the same script. Filing rather than widening that PR: this is a different sub-class (unwindowed path history with a fallback, not a windowed date question), and it is latent rather than measured damage.
The site
scripts/collect-release-notes.sh, section 2 — printing the body of each changeset the release consumed:The inner
git log -- <path>walks history with no range bound, so in a shallow clone it stops at the graft. If the commit that deleted the changeset sits below the floor, the substitution is empty, thegit show "~1:..."that wraps it fails,2>/dev/nulleats the error, and the||fallback prints${PREV_REF}:${f}instead.Why it is worth a line
The fallback is not obviously wrong — for a changeset added before
PREV_REFand never edited, the two copies are identical, which is presumably why it was written. It is wrong exactly when the changeset was edited during the dev cycle: the release page is then written from the pre-edit prose, and nothing in the output says which copy was printed. Same shape as the rest of this family — a real, plausible answer with no signal attached.Bounded today: the file list feeding this loop comes from a
PREV_REF..NEW_REFwalk that is itself truncated in the same clone, so the loop is likely short before it is wrong.Possible repair
Say which copy was printed, or refuse — the horizon predicate is already in the file after PR #10506 (
cloud_window_guardcallsscripts/pm/git-history.mjs), so the machinery is there. Deliberately not done in PR #10506: its subject was the windowed class, and widening a release-time script on a latent case is how a scoped PR stops being reviewable.Related
#9902 · PR #10506 · #9450 (the range-question sibling: an endpoint that resolves does not make the range walkable)
Generated by Claude Code