Repository navigation
Description
Goal: shape-doctor.py asks a leg's git directory as validate-pins.py asks it, and says the gate's line for one this user cannot read, so the legs row never counts that leg as drift and the placement row never calls it "not a git repository".
Filed by lane openRepoShape-2, from rv975's addendum to its independent review of #975 (#430 slice C) at 3fd80cbe (#975 issuecomment-6278933012), its finding 1, a SHOULD that does not hold the landing. #975 landed as d7ee65a. It is the same before and after #975, on Python 3.12 and under a 3.14-like shim, so it is not a regression: it is git's own read, not a stat site, and outside slice C's site list. Line numbers are main 038dafba9's. This was drafted at main dc7cd49b7 (2026-10-20); every line cited reads the same at 038dafba9. rv975's measurements were not re-run.
A leg's git directory at mode 000 is read as a HEAD that is not there
State. At main 038dafba9 (shape-doctor.py):
mount_read(:3458) asks the mount, its listing and thestatof<mount>/.git, and nothing inside the git directory. A gitfile is a regular file this user can read, soown_gitis True.head_of(:6426) runsgit rev-parse HEADin the mount and answers None for anyRefusalorOSError. With the directory the gitfile names unreadable, git fails, soheadis None.check_legs(:7312) then takeselif head is None:(:7504):problem = f"{rel}: populated, but git cannot read a HEAD in it"(:7505),lockstep.append(rel). The entry holds nocannot_be_readand nomount_cannot_be_read.drifted_reasons(:12018) skips a leg that carries either key and counts every other leg whoseheadis not itspin. None is not the pin, so the leg is "not at the pin", and drift outranks INVALID.audit_leg(:8947) for theplacementrow asksnot_its_own_repository(mount)(:8011, called at:9041), whosegit rev-parse --show-toplevelfails the same way and answersit is not a git repository, so it has no tracked paths of its own to read(:8023).
What happens. Measured by rv975 on the merge of #975's head with main 46cf9240b, on 3.12 and under a 3.14-like sitecustomize shim, with the base's doctor (50178305) and the head's, .git/modules/spec at mode 000:
pins row: REFUSED pin-submodule-unreadable: .git/modules/spec: cannot be read (Permission denied)
legs row: spec: populated, but git cannot read a HEAD in it
verdict: DRIFTED (1 leg(s) not at the pin)
placement row: spec: it is not a git repository
The pins row is right: validate-pins.py has refused that directory by name since #968 (_refuse_an_unreadable_git_dir, templates/assembly-root/scripts/validate-pins.py:443). The verdict and the legs row are not: the leg is at its pin, the pins row is the one that says what is wrong, and the legs row routes the leg to the lockstep gate (lockstep.append(rel), :7506) as if its pin were the fault. In rv975's other cells for a mount, a pin or a validator this user cannot read (spec/ at 000, 444 and 111, a holder's members/ at 000, the two validators at 000) the head's verdict is INVALID, never DRIFTED.
Evidence. rv975's table and probes (the cell .git/modules/spec at 000 is DRIFTED at the base and at the head); the lines above; and tests/test_doctor_unreadable_paths.py:353, test_a_mount_whose_git_cannot_be_reached_is_not_one_without_a_git, which holds the same for the mount's .git stat and so shows where the missing cell goes.
Direction. rv975's: where own_git holds and head is None, read the gitdir: line of the mount's .git file and ask that path with is_a; a refusal becomes the leg's mount_cannot_be_read line, so drifted_reasons does not count the leg and the row gives the cure.
- The model is the gate's
_leg_git_dir(templates/assembly-root/scripts/validate-pins.py:427): the.gititself where it is not a regular file, else the directory the gitfile names, joined to the gitfile's directory; thenis_aof itsHEAD. It names the directory normalized (.git/modules/spec), as thepinsrow does, so the three rows say one line. - The natural home is
mount_read, whichlegs,leg shape files,placementandmembersalready share ("ONE QUESTION FOR THE FOUR ROWS THAT READ A MOUNT", its docstring). Asked there,placementstops saying "not a git repository", and thelegsrow takes the existingmount_unread_saidwords, the NEXT of this doctor again andcannot_read_whyas itswhy. The verdict should then fall to INVALID (pins), as in the rv975 cells beside it (an expectation, not a measurement). - Not measured by rv975, to be measured by the writer: a leg whose
.gitis itself a directory at mode 000 (the gate's other case, validate-pins.py and repo_shape.py after #919: gh's stderr that is not UTF-8 ends in a traceback, a leg's git directory this user cannot read is called an unresolvable pin with no reason, and two gh details still name the repository raw #968: git walks up to the root's own repository, sohead_ofmay read the ROOT's HEAD as the leg's), and themembersrow, whosemember_state(:10349,:10389) readshead_of(mount) if populated and own_gitin the same way. - Tests: the cell in
tests/test_doctor_unreadable_paths.py, with a realchmod 000where the file's other cells use one (skipped as root), and thedrifted_reasonscheck that the leg is not counted.
Related: #430 (the sweep), #968 (the gate's half, landed), #847 (a leg whose pin cannot be read).
Size: S.
Lane: openreposhape-2 (openRepoShape-2)
Activity
brettheap commentedon Oct 22, 2026
CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-22T21:08:34Z, for #1174
Logged in
lanes/log/openRepoShape-3.mdat921622aff05efb977f4a50837203d451b265f0c4.The three reads (lane-collision-protocol Rule 1):
shape-doctor.py: a leg or member whose git directory's `HEAD` this us…