Repository navigation
validate-pins.py, validate-family.py and scripts/repo_shape.py: a git directory whose HEAD is a FIFO hangs the assembly gate and the family holder's gate with no answer, because git_out has no timeout and neither gate refuses a HEAD that is no regular file (RV1239 on #1239, W1256 on #1263; follows #1222 and #1256) #1290
Description
(lane openRepoShape-3, 2026-11-09T22:05:03Z)
Found by: RV1239, lane 3's independent review of PR #1239 (for #1222) at fff42145 (#1239 issuecomment-6385532185), and W1256, the writer of PR #1263 (for #1256), in that PR's body: its before/after table and its "Out of scope". It is filed on Brett Heap's word "file follow-ups 5, 10 and 15" (2026-11-09). It is on v1.2.2, the patch after v1.2.1, which adds no command and no flag.
It lands after #1239 and after #1263 (both lane 3's, both on v1.2.1, both open at filing; #1263 is stacked on #1246 and #1239). It builds on the open of a git directory's HEAD that those two PRs add to the two gates, so it cannot be written before they are on main.
Line numbers are at main 8cf6477fe, read and not run, except where a PR head is named. No FIFO was made, and no git was run against one, in writing this body: every measurement here is RV1239's or W1256's, quoted. This body is ASCII.
What is missing
A person can see it: a gate that never answers. The two gates that name a git directory's unreadable HEAD by name (#1222 for a leg, #1256 for a member) say nothing at all about a HEAD that is a FIFO. They hand it to git, and git waits for a writer.
-
RV1239 (validate-pins.py: a leg git directory's
HEADthis user cannot open, under.git/modules/<leg>or in a.gitdirectory, is refusedpin-submodule-unreadableby name, where it endedpin-commit-unresolvable(#1222) #1239 issuecomment-6385532185), measured "with my own probe. Each tree's gate ran in a project scaffolded by that tree, 45 s timeout. Main 50869f3 against this head":A FIFO HEAD hangs at main AND at this head (exit 124 at 45 s). The hang is git's own open of HEAD; git_out has no timeout. Not a regression and not this PR, but it wants a follow-up issue.
(124 is the code
timeoutgives; the gate gave none.) This is the assembly gate,templates/assembly-root/scripts/validate-pins.py, which validate-pins.py: a leg git directory'sHEADthis user cannot open, under.git/modules/<leg>or in a.gitdirectory, is refusedpin-submodule-unreadableby name, where it endedpin-commit-unresolvable(#1222) #1239 changes. -
W1256 (validate-family.py: a member whose git directory's
HEADthis user cannot open, under.git/modules/<path>or in a.gitdirectory, is refusedmember-unreadableby name, where it endedmember-commit-unresolvablewith a fetch (#1256) #1263's body), on git 2.43.0, Python 3.12.3, uid 1000, offline, each holder scaffolded from the tree under test, "its ownscripts/validate-family.pywas run in it as a subprocess, each run bounded at 60 s". Its table has the row (state, beforebc602077, after9ef8f0ab):| FIFO
HEAD(.git/modules/members/IRRS/HEAD) | no answer in 60 s | no answer in 60 s: git's, not this check's (see "Out of scope") |and its "Out of scope" opens with:
A FIFO
HEADstill hangs the run, in git. This check does not open it (the[fifo]rows, mutant M3), butgit rev-parsedoes: with.git/modules/members/IRRS/HEADa FIFO, the holder's gate sat inpolland its childgit rev-parse --verify --quiet <commit>^{commit}inwait_for_partner, and a baregit rev-parse --verify --quiet HEADin a repository whoseHEADis a FIFO timed out (timeout 10, rc 124). It was the same before this change, and the leg gate after validate-pins.py: a leg git directory'sHEADthis user cannot open, under.git/modules/<leg>or in a.gitdirectory, is refusedpin-submodule-unreadableby name, where it endedpin-commit-unresolvable(#1222) #1239 is the same. Refusing aHEADthat is no regular file or link would be a change of its own, for both gates.This is the family holder's gate,
templates/family-root/scripts/validate-family.py. -
Not measured by either: a
HEADthat is a link to a FIFO, a socket, or any other caller ofgit_out(below).
Why (the code, read and not run)
git_outhas no timeout.scripts/repo_shape.py:1371(def git_out) runssubprocess.run(["git", *args], cwd=str(cwd), capture_output=True, check=False, env=env)at:1397. The wordtimeoutappears nowhere in the file (grep -c timeoutprints 0).- Both gates call it on the leg's or member's own directory.
templates/assembly-root/scripts/validate-pins.py:1303:git_out(["rev-parse", "--verify", "--quiet", f"{commit}^{{commit}}"], cwd=submodule), inside_git_runs(...), after_refuse_an_unreadable_git_dir(root, dotgit)(:1296).templates/family-root/scripts/validate-family.py:1500: the same call withcwd=member, after the same guard.
- The guard that validate-pins.py: a leg git directory's
HEADthis user cannot open, under.git/modules/<leg>or in a.gitdirectory, is refusedpin-submodule-unreadableby name, where it endedpin-commit-unresolvable(#1222) #1239 and validate-family.py: a member whose git directory'sHEADthis user cannot open, under.git/modules/<path>or in a.gitdirectory, is refusedmember-unreadableby name, where it endedmember-commit-unresolvablewith a fetch (#1256) #1263 add lets a FIFO through on purpose. At validate-pins.py: a leg git directory'sHEADthis user cannot open, under.git/modules/<leg>or in a.gitdirectory, is refusedpin-submodule-unreadableby name, where it endedpin-commit-unresolvable(#1222) #1239's head66741c6c7,validate-pins.pyhas_gitfile_opens(:397) and_refuse_an_unreadable_git_dir(:446); at validate-family.py: a member whose git directory'sHEADthis user cannot open, under.git/modules/<path>or in a.gitdirectory, is refusedmember-unreadableby name, where it endedmember-commit-unresolvablewith a fetch (#1256) #1263's head9ef8f0ab5,validate-family.pyhas them at:570and:621. EachstatsHEAD(_is_there, or_is_a(head, _any_kind)), then calls_gitfile_opens(head), which opens onlyif _is_a(path, stat.S_ISREG)and otherwise returns True; its docstring says "Only a regular file is opened, since the open of a FIFO waits for a writer". So the guard does not hang on a FIFO, and does not refuse it: therev-parseafter it is where the run stops. W1256's[fifo]rows and mutant M3 hold that the guard never opens one. git_outis shared. Every tool that imports it fromscripts/repo_shape.py(the two gates atvalidate-pins.py:75-77andvalidate-family.py:194-197, among them) shares whatever a timeout there would do. Nobody has measured what any other caller does with a FIFO.
The fix (as RV1239 and W1256 framed it; the writer settles the open choices)
RV1239 names the cause: "git_out has no timeout". W1256 names the other end: "Refusing a HEAD that is no regular file or link would be a change of its own, for both gates."
- To settle: where.
- (a) In both gates, refuse a
HEADthat is neither a regular file nor a link, by name, before git is asked: the guard already tells the two apart (_is_a(path, stat.S_ISREG)) and only skips the open. One wording for both, since validate-family.py: a member whose git directory'sHEADthis user cannot open, under.git/modules/<path>or in a.gitdirectory, is refusedmember-unreadableby name, where it endedmember-commit-unresolvablewith a fetch (#1256) #1263 holds a parity row that the family gate's line forHEADequals the assembly gate's. A new refusal code, orpin-submodule-unreadableandmember-unreadablewith a reason that names the file kind (the gates already name aHEADwith "cannot be read (<reason>)"). - (b) In
git_out, a timeout, so that no git call waits for ever. The cost, not measured: it is shared by every tool; it needs an answer for what a call that timed out reads as (aRefusal, asgit-failedis); and a root has its own copy ofscripts/repo_shape.py, whichvalidate-pins.py:651says may be older than the gate, so a timeout there may not reach a root whose gate is new. - (c) Both. (a) names the one state RV1239 and W1256 met; (b) bounds the ones nobody has.
- (a) In both gates, refuse a
- To settle: a link. Where
HEADis a link,statfollows it, so a link to a FIFO may look like a FIFO to the guard. Neither source measured it: the writer measures it, bounded, and says which kinds the refusal covers (FIFO, socket, device, a link to either). - The answer for a regular
HEAD, aHEADat 000 (validate-pins.py and shape-doctor.py: a leg's git-directoryHEADfile at mode 000 passes the gate'sstatof HEAD and endspin-commit-unresolvable, and the doctor reads the leg DRIFTED, where both should name the file this user cannot open #1222, validate-family.py: a member whose git directory'sHEADfile this user cannot open is refused by name,member-unreadable, where it is calledmember-commit-unresolvableand told to fetch #1256), a directory, a dangling link and noHEADstays as validate-pins.py: a leg git directory'sHEADthis user cannot open, under.git/modules/<leg>or in a.gitdirectory, is refusedpin-submodule-unreadableby name, where it endedpin-commit-unresolvable(#1222) #1239 and validate-family.py: a member whose git directory'sHEADthis user cannot open, under.git/modules/<path>or in a.gitdirectory, is refusedmember-unreadableby name, where it endedmember-commit-unresolvablewith a fetch (#1256) #1263 land it.
Rows (they must fail before the change)
Each runs the gate as a subprocess with a timeout of its own, so that a hang fails the row and does not hang the run, as W1256's [fifo] rows make an open fail the row.
- The assembly gate, a gitfile leg with
.git/modules/<leg>/HEADa FIFO, and a leg whose own<leg>/.git/HEADis one: today no answer within the row's bound; after, the chosen refusal (exit 2) or the chosen timeout answer, within it. - The family holder's gate,
.git/modules/members/IRRS/HEADa FIFO, andmembers/IRRS/.git/HEAD: the same. - A parity row: both gates give one line for the same FIFO
HEAD. - A mutant for each: the new check dropped, or the timeout taken out. The row must fail on it.
- The rows are skipped where there is no
os.mkfifo.
Not here
- The hang is in git's open of
HEAD. Nothing here makes git stop opening a FIFO. objects/orconfigat 000 in a member's git directory is stillmember-commit-unresolvable(validate-family.py: a member whose git directory'sHEADthis user cannot open, under.git/modules/<path>or in a.gitdirectory, is refusedmember-unreadableby name, where it endedmember-commit-unresolvablewith a fetch (#1256) #1263's "Out of scope"; the leg gate is the same).- The holder's own
HEADis bootstrap.py, validate-family.py and siblings.py: a root or holder whose.gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172's area (validate-family.py: a member whose git directory'sHEADthis user cannot open, under.git/modules/<path>or in a.gitdirectory, is refusedmember-unreadableby name, where it endedmember-commit-unresolvablewith a fetch (#1256) #1263's "Out of scope"), and the doctor'smembersrow is shape-doctor.py: a leg or member whose git directory'sHEADthis user cannot open is named in the gate's words,spec: .git/modules/spec/HEAD: cannot be read (<reason>)orspec/.git/HEAD: ..., so thelegsandmembersrows read INVALID with the gate's line and never DRIFTED, andplacementnever calls the leg "not a git repository" (#1222) #1248's. - The doctor's half of validate-pins.py: a leg git directory's
HEADthis user cannot open, under.git/modules/<leg>or in a.gitdirectory, is refusedpin-submodule-unreadableby name, where it endedpin-commit-unresolvable(#1222) #1239 (RV1239's doctor-parity items) is validate-pins.py: a leg git directory'sHEADthis user cannot open, under.git/modules/<leg>or in a.gitdirectory, is refusedpin-submodule-unreadableby name, where it endedpin-commit-unresolvable(#1222) #1239's own.
Done when
- Each gate, in both shapes, answers a FIFO
HEADwithin a bound, where today it gives no answer in 60 s (W1256) or at 45 s (RV1239). - A row per gate and shape fails on a mutant that puts the hang back.
- The choice between (a), (b) and (c) is written where the next writer will read it, with what it cost to other callers of
git_out.
See #1222, #1239, #1256 and #1263.
Lane: openreposhape-3 (openRepoShape-3)
Activity
brettheap commentedon Nov 9, 2026
CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-11-09T22:07:19Z, for #1290
Logged in
lanes/log/openRepoShape-3.mdat1f6d143d910dffc115998651b8cd88c9b6320cde.The three reads (lane-collision-protocol Rule 1):