Repository navigation
Description
Goal: wherever adopt-project.py looks for an earlier run's split branches, a source refs directory this user cannot list is refused source-unreadable by name, as #1252 (#1219) does for the default branch. A stale split branch there is then never read as absent, and check never says plan ok over it.
Filed by lane openRepoShape-3 on Brett Heap's word "file follow-ups 7 and 8" (2026-11-08T15:32:43Z). It comes from lane 3's RV1252, the independent review of #1252 (#1219) at 40b030cb, its S3 (#1252 issuecomment-6723262475): "_branches_at/_branches_in (adopt-project.py:9907, :10051) still read an unlistable directory as empty ... Outside #1219 as filed: name it under Out of scope and file an issue." #1252's body now names it under "Out of scope".
Two readers still take git's silence for "none"
State (line numbers at #1252's head 40b030cb):
- git skips a refs directory it cannot list:
for-each-refexits 0 with nothing for it (adopt-project.py: a source whose.git/refs/headsthis user cannot read is refusedsource-default-branch-not-localwith(its branches: none), a false list, where the refusal should name the directory git could not list #1219). - adopt-project.py: a source whose
refsthis user cannot list is refusedsource-unreadablenaming the directory, neversource-default-branch-not-local"(its branches: none)" (#1219) #1252 routes_branch_namesand_symbolic_refthrough a new_refuse_unlisted_refs. It asks the directories only where git's answer was none, and raises the existing_source_unreadablenaming the directory. _branches_at(:9907) and_branches_in(:10051) feed the split-branch finding,adopt-branch-exists. They still list through git alone.
What happens (measured by RV1252 at 40b030cb: uid 1000, git 2.43.0, Python 3.12.3, stub gh). Take a source with a stale adopt/three-repo-shape in refs/heads/adopt, at a commit outside main:
- readable:
checkgivesFINDING adopt-branch-exists, exit 1; - with
refs/heads/adoptat mode 000:checksaysplan ok, exit 0.
Direction. No command and no flag. This lands after #1252, which brings _refuse_unlisted_refs.
-
The ask. Have
_branches_atand_branches_inask_refuse_unlisted_refs, or its listing check, for the prefix they read, only where git's answer was none. An unlistable directory is then refusedsource-unreadablenaming it, with thechmod u+rxcure. -
No new calls. A readable source must run the same git calls as now. RV1252 counted 18, 57 and 101 for
plan,checkandexecute, unchanged by adopt-project.py: a source whoserefsthis user cannot list is refusedsource-unreadablenaming the directory, neversource-default-branch-not-local"(its branches: none)" (#1219) #1252. -
The rows go with the split-branch finding's tests or in
tests/test_adopt_tracking_branch.py. Put the mode rows underneeds_a_mode, with in-process stand-ins that refuseos.scandir. -
With a directory
_branches_ator_branches_inreads at mode 000, such asrefs/heads/adopt,checkandexecuterefusesource-unreadablenaming the directory, exit 2, and neverplan ok. (Amended 2026-11-08 at adopt-project.py: a stale split branch in a source refs directory this user cannot list is refusedsource-unreadableby name, neverplan okfromcheckor two legs made byexecute(#1257) #1265's review, rv1265's N4:plannever reads the split branch, soplanis unchanged; adopt-project.py: a stale split branch in a source refs directory this user cannot list is refusedsource-unreadableby name, neverplan okfromcheckor two legs made byexecute(#1257) #1265's body says so under its Out of scope.) Each row fails before and passes after. -
A readable source with a stale split branch still gives
FINDING adopt-branch-exists. A readable source with none is unchanged, with the same git calls. -
The mode rows are skipped under root and on Windows, and in-process stand-ins cover them.
-
One mutant, the new ask dropped, fails a row; each mutant run is restored and checked with
cmp.
Placement. As for #1247: this joins v1.2.1 if its PR is READY before v1.2.1's last steps, and otherwise goes to the next milestone. Lane 3 claims it.
Related: #1219 with #1252 (the default-branch readers), and #1186 (_refused_git_path).
Size: S.
Lane: openreposhape-3 (openRepoShape-3)
Activity
brettheap commentedon Nov 8, 2026
CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-11-08T15:37:32Z, for #1257
Logged in
lanes/log/openRepoShape-3.mdat505e05f38695aec60e8937b75a18d1434331b610.The three reads (lane-collision-protocol Rule 1):
adopt-project.py and tests: pin #1265's fallback to git and word _com…
Merge main (dcf63b8) into l3-1276-source-remote-name: #1252's and #1265…