🐛 fix(changelog): overlay pending deletions into the §10e tagged-tree sandbox (D-181 follow-up) - #136
Merged
Merged
Conversation
… sandbox (D-181 follow-up) §10e overlaid the working tree with `git ls-files | tar`, so a tracked file deleted but not yet staged (plain `rm` before `git add -A`) made tar fail to stat it and `task check` went red with "could not overlay the working tree", a reason that is not the changelog; a staged deletion was silently kept in the sandbox, so the nested run did not grade the tree under test. overlay_worktree now clears every tracked file in the sandbox and copies only the tree's tracked files that still exist. A fixture row pins it: a modified file is carried over, and both an unstaged and a staged deletion are absent. The row reds on the previous body with tar's "Cannot stat".
|
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.



Why
Review of #135 (D-181) found one defect in its new §10e row of
hack/release/changelog_gate_test.sh. The row overlaid the working tree into its tagged-tree sandbox withgit ls-files -z | tar -cf - --null -T -, and that has two problems:rm, then runtask checkbeforegit add -A.tarcan't stat the file (tar: …: Cannot stat: No such file or directory, exit 2), so the suite fails with "could not overlay the working tree into the tagged-tree sandbox". That failure has nothing to do with the changelog.git rmstayed in the sandbox from the HEAD checkout, so the nested run didn't grade the tree under test.What
overlay_worktree <src> <dst>. It clears every file the sandbox tracks, then copies only the source's tracked files that still exist on disk. The followingadd -Ain the sandbox records both kinds of deletion.Evidence
tar: unstaged-rm: Cannot stat.changelog_gate_test.shpasses with an unstaged deletion (rm docs/vision.md) in the tree, which is the exact state that went red before.task checkgreen, run under the pinned toolchain. Locally it neededGOFLAGS=-buildvcs=false, because Go's VCS stamping couldn't run git inside the isolated worktree. That is environmental, and CI runs the unmodified check.