Repository navigation
bootstrap.py (the assembly root's): a leg moved off a branch has an ignored file the pin tracks overwritten and a merge in progress ended, with no word, and a tracking branch ahead of the pin with no commit of its own is left where it is #709
Description
make bootstrap should not overwrite an ignored file at a path the pin tracks, or end a merge in progress, without saying so, and it should place a tracking branch that is ahead of the pin with no commit of its own where the pin is (or AGENTS-shape.md should stop saying it does). The riders in the same placement code ride with it.
From lane 4's checklist triage of 2026-10-16 (T1), approved by Brett Heap at 2026-10-16T13:36:07Z ("approve all triage recommendations"). One pull request covers the lines below, together with #710.
Parent: #458. Milestone: v1.1.1 (a follow-up filed after Brett Heap's v1.1.1 word of 2026-10-16T13:35:28Z).
Authored after the v1.1.0 work; lands after the v1.1.0 tag unless the release owner (lane 3) says otherwise.
Lands after: lane 2's #634 (ready; it edits templates/assembly-root/AGENTS-shape.md) and lane 5's #694 (filed, no pull request yet; it edits the same templates/assembly-root/scripts/bootstrap.py, at recorded_gitlink, _try_git and the git run). Whichever of these lands second re-gates against the first.
Effort: M: --no-overwrite-ignore on three checkouts and a merge, one operation-in-progress refusal (which may need a ruling, see below), one re-pin. Platform: all (L4-79 is about case-insensitive disks only).
Files: templates/assembly-root/scripts/bootstrap.py and templates/assembly-root/AGENTS-shape.md, both pinned shape copies. The pull request re-pins them once, and re-pins bootstrap.py once for #709 and #710 together, so each project's v1.1.1 update takes one upstream-changed row per file.
Lane openRepoShape-4 claims it at filing; see its CLAIMED comment.
Why this is filed. Two of the lines lose a person's work, and a real user can meet them:
- L4-74. An ignored file at a path the pin tracks is overwritten, silently, by every placement that changes files.
- L4-75. A merge in progress is ended by the move off its branch.
The rest is exotic input: a tracking branch whose tip is its upstream's own tip, a symbolic HEAD outside refs/heads/, and a case-only branch name on a case-insensitive disk.
Line numbers are at c6122e8 (#639); main has moved since.
Lines
- L4-74 (P2: work is lost): every bootstrap placement that changes files OVERWRITES an ignored file at a path the pin tracks, silently: the on-branch
merge --ff-only(bump-leg.py, thenmake bootstrap, leaves the leg detached: bootstrap never fast-forwards a local tracking branch that is behind the new pin, though AGENTS.md, README and bump-leg.py say it re-places it #475), P9 (place_at_pinfrom another branch), the missing-branchcheckout -b, and T7 (bootstrap.py and AGENTS-shape.md: a leg on another branch is placed when its tracking branch is at the pin and left when it is behind, and the family holder's copy still promises placement unconditionally #603). R603 measured it on main and on bootstrap.py: a leg on another branch whose tracking branch is behind the pin is fast-forwarded and checked out as one at the pin already is, and the family holder's AGENTS-shape.md and bump-leg.py say bootstrap places a leg where that loses no commit (#603) #615's head alike, with the ignored file listed ininfo/excludeor in the other branch's.gitignore. Where:templates/assembly-root/scripts/bootstrap.py:454-455names the overwrite and the file has no--no-overwrite-ignore. Fix:--no-overwrite-ignoreon those checkouts and on the merge; git 2.43 has the flag for both. (source) - L4-75 (P2: work is lost): moving a leg off a branch with a merge in progress (
merge --no-commit) ENDS the merge:MERGE_HEADis removed and the staged result is carried onto the tracking branch. This happens in P9, on the missing-branch path and in T7. A cherry-pick or revert in progress should go the same way when its staged file does not block the checkout; that is reasoned only. Where:bootstrap.py:286and:454-456. Fix: refuse to move off a branch with an operation in progress, and say so. (source)
Rides along (backlog; tick it here if the same change covers it)
- L4-76: P9's line (
on <branch> at <pin> (branch tip == pin)) does not name the branch HEAD left. T7's does, after bootstrap.py: a leg on another branch whose tracking branch is behind the pin is fast-forwarded and checked out as one at the pin already is, and the family holder's AGENTS-shape.md and bump-leg.py say bootstrap places a leg where that loses no commit (#603) #615's fix round 1. Where:bootstrap.py:414prints that line and no branch left. (source) - L4-77: a tracking branch AHEAD of the pin with no commit of its own (its tip is its upstream's remote-tracking ref) is left with
not moving an existing branchwhenever HEAD is on the branch, on another branch, or on a branch with no commit yet.move_back_to_pinstarts only from HEAD detached at the pin. Moving it back would lose no commit, sotemplates/assembly-root/AGENTS-shape.md:95-96("places each leg ... where that loses nothing") is false of these states. Where:bootstrap.py:502;AGENTS-shape.md:95-96is unchanged. Either the placement moves it back or the sentence says what it leaves. (source) - L4-78: HEAD as a symbolic ref outside
refs/heads/: P9 places the leg, while T7 printswhich is neither. This is exotic, and byte-identical to main. Where:bootstrap.py:468-469(P9) and:380(which is neither). (source) - L4-79 (DOUBTFUL): reasoned only, for case-insensitive disks: the
current != refs/heads/<branch>compare is case-sensitive. A branch that differs from the tracking branch only in case could take the T7 path, andbranch -fwould then write the loose ref file both names share. Where:bootstrap.py:469comparesrefs/heads/<branch>exactly (read). Whatbranch -fthen does on a case-insensitive disk needs a macOS or Windows run, and CI is Linux only since ci: run the test suite on Linux only #597, so the pull request may close it with a note and no change. (source)
What is expected
- No placement overwrites an ignored file at a path the pin tracks. It refuses by name, or leaves the file and says so.
- A merge in progress is not ended by a move off its branch. The placement refuses and says what to finish first. This may need a ruling from Brett Heap: whether it is a refusal (exit 2) or a NOTE that goes on. It is a new refusal in a path that moves files today.
- P9's line names the branch HEAD left, as T7's does.
- A tracking branch ahead of the pin with no commit of its own is moved back, or
AGENTS-shape.md:95-96is reworded to say which states it leaves. The pull request picks one and says which. - Tests for each: an ignored file in
info/exclude, an ignored file in the other branch's.gitignore, amerge --no-commit, a branch whose tip is its upstream's.
Not a duplicate: lane 5's #648 and #682 are the FAMILY root's bootstrap.py (L4-80 went to them), and #694 is a missing git. No issue numbered #650 to #700 cites L4-74 to L4-79 (read at 13:17Z).
Each line above is a line of #458's checklist comment (issuecomment-6201724792). Tick it there too when this closes.
Lane: openreposhape-4 (openRepoShape-4)
Activity
brettheap commentedon Oct 16, 2026
CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-10-16T13:58:11Z, for #709
Logged in
lanes/log/openRepoShape-4.mdat167ea3fc96e8cfae6ed2c53cf49869cee6acb2e6.The three reads (lane-collision-protocol Rule 1):
brettheap commentedon Oct 16, 2026
(lane openRepoShape-4, 2026-10-16T14:24:33Z) Closing as a duplicate of #704 (lane openRepoShape-5's, filed 2026-10-16T13:47Z), as lane 5 pointed out on #473 (issuecomment-6217544742).
Both come from the same source, Tracking: update-shape.py and bump-leg.py, keeping a project's shape copies and leg pins current #458's issuecomment-6201724792 (R603). This issue's L4-74 to L4-78 are bootstrap.py: moving a leg off a branch overwrites an ignored file and ends a merge, P9 does not name the branch it leaves, a branch at its upstream's tip is left when HEAD is on a branch, a HEAD outside
refs/heads/is read two ways #704's lines 1 to 5.Brett Heap has already ruled bootstrap.py: moving a leg off a branch overwrites an ignored file and ends a merge, P9 does not name the branch it leaves, a branch at its upstream's tip is left when HEAD is on a branch, a HEAD outside
refs/heads/is read two ways #704 for v1.1.0, in lane 5's session:AGENTS-shape.md:95-96is narrowed to what the code does;Lane 5's writer is on it (
fix/704-bootstrap-leg-moves).L4-79 (DOUBTFUL: the case-only compare at
bootstrap.py:469, which needs a macOS or Windows run) is in neither issue. It stays on Tracking: update-shape.py and bump-leg.py, keeping a project's shape copies and leg pins current #458's checklist.Lane 4 releases its claim on this issue.
Lane: openreposhape-4 (openRepoShape-4)
brettheap commentedon Oct 16, 2026
RELEASED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-10-16T14:25:11Z, for #709 — closed as a duplicate of lane 5's #704 (filed 13:47Z, ruled for v1.1.0 by Brett Heap in lane 5's session); L4-79 stays on #458's checklist