Repository navigation
scripts/validate-repository-naming.py _link_sources_from_args (:406) and templates/assembly-root/scripts/validate-pins.py PinSources (:409): a key with an empty path (--link-source openXdox=, --pin-source openXdox=) is Path(""), which is the current directory, so run from a project root the naming gate reads the project's OWN project.yaml as the link's declaration and reports a chain that holds as broken, a FINDING (exit 1) for a name with no direct pin #442
Description
Lane: openreposhape-5 (openRepoShape-5)
(lane openRepoShape-5, 2026-10-12T17:59:35Z)
What is wrong. _link_sources_from_args splits a --link-source value at its first = and stores Path(path) for the key (scripts/validate-repository-naming.py:406). When nothing follows the =, path is the empty string and Path("") is .. Nothing refuses it, and resolve_link_source (scripts/repo_shape.py:2380) asks link_manifest_path (:2351) about ., which is a directory that holds a project.yaml: the one in the directory the validator was run from. Run from a project root, where the project's own gates run, the project's own manifest is read as the declaration of the link. The project declares openXdox (its own pin), not openDox, so the chain is "broken", and the message says "openXdox declares openXdox, not openDox" about a tree nobody pointed at. Run from any other directory the empty path finds no manifest and the link is quietly declared-unverified, so the same typo gives two different answers depending on where it was typed.
The same shape is in #312's PinSources: templates/assembly-root/scripts/validate-pins.py:409 stores Path(path) for a key, so --pin-source openXdox= names ., the project root itself, as the stand-in clone of the neutral product. There it is not a silent misread: a project root rarely holds the pinned commit, and the digest question fails as a neutral-pin-source-unreadable FINDING that names . (observed below). It is the same unexamined empty value, and the fix belongs in both.
Found by lane 5's review of fix/link-source-values at 40762ca (the fix for #338), as its F3. Pre-existing: the verdicts below are the same on origin/main 1f90a0f and on that branch (run on both, 2026-10-12T16:18Z), because that branch changes how a value is split and what is said of a source that cannot answer, and leaves Path(path) alone. Not claimed.
# $U: a checkout of openRepoShape. Nothing here touches a network or `gh`.
D=$(mktemp -d)
mkdir -p "$D/work/codexInk" "$D/trees/openXdox"
printf 'neutral_product_pins:\n - openInk\n' > "$D/trees/openXdox/project.yaml" # openXdox pins openInk
cat > "$D/work/codexInk/project.yaml" <<'YML'
neutral_product_pins:
- openXdox
legs:
- repository: testorg/codexInk
path: "."
role: assembly
naming:
referent_chain: [openXdox, openInk]
YML
cd "$D/work/codexInk"
python3 "$U/scripts/validate-repository-naming.py" --project project.yaml --link-source "openXdox=$D/trees/openXdox"; echo "control: exit $?"
python3 "$U/scripts/validate-repository-naming.py" --project project.yaml --link-source openXdox=; echo "empty path: exit $?"
(cd "$D" && python3 "$U/scripts/validate-repository-naming.py" --project work/codexInk/project.yaml --link-source openXdox=; echo "empty path, from $D: exit $?")Observed on origin/main 1f90a0f and on 40762ca, Python 3.12.3:
| the run | result |
|---|---|
--link-source openXdox=<the real tree> (control) |
codexInk classified domain-descendant/assembly, nothing else, exit 0 |
--link-source openXdox=, run from the project root |
FINDING codexInk: the declared chain openXdox → openInk is broken (openXdox declares openXdox, not openInk), the name classified project-leg/assembly, exit 1 |
| the same, run from another directory | WARNING codexInk: declared-unverified: openXdox declaring a pin on openInk ..., exit 0; 40762ca adds WARNING link-source-unreadable: . (--link-source openXdox=...) could not answer for openXdox: it holds no project.yaml, which at least names . |
With codexDox in place of codexInk the first failing row is the same text as a WARNING, exit 0, because a pin on openXdox is also a direct pin on codexDox's referent openxDox (the x-stem spelling).
The validate-pins.py half, on a scaffolded codexDox project (scaffolded with local remotes from origin/main 1f90a0f: scaffold-project.py --org codexSoft --project codexDox --pin openXdox@<sha> --pin-source <a local clone> --referent-chain openXdox,openDox --local-remote-dir ... --work-dir ..., then cloned recursively, with a clone of the pinned product beside it):
$ python3 scripts/validate-pins.py --pin-source openXdox=
FINDING neutral-pin-source-unreadable: contracts/openxdox-pin.yaml: . (--pin-source openXdox=...) could not answer for opensoft/openXdox @ df3761f...: `git ls-tree -r -z df3761f...` in . exited 128: fatal: not a tree object
exit 1
$ python3 scripts/validate-pins.py --pin-source openXdox=../openXdox.away # control: the real clone
ok openXdox: pin commit df3761f3e839 digest recomputes (--pin-source openXdox=...)
pins ok
exit 0
What it should do. An empty path after a key is not a path. In both tools, LINK= or PRODUCT= with nothing after the = is refused as an argument error or, at least, noted ("--link-source openXdox= names no path") and never turned into .; a bare value that is the empty string gets the same treatment. The author chooses refuse versus note; a note must keep the link unverified rather than read the current directory. Whether --link-source . (an explicit .) stays a valid way to name the current directory is not in question: it does, and says so by being typed.
How to test. In tests/test_naming_policy.py, the run above from a tmp_path project root and from another directory, asserting exit 0 and no "declares" line for the empty path under the chosen rule, and the control unchanged; in tests/test_pin_validator.py or tests/test_neutral_pin_validator.py, --pin-source openXdox= against a scaffolded project, asserting the same refusal or note and not a finding that names .. Reverting the fix fails both.
Not in this issue.
- How a value holding
=is read, and what is said of a source that cannot be entered (scripts/validate-repository-naming.py:_link_sources_from_argssplits every--link-sourcevalue at its first=and nothing reports a value no chain link used, so a link tree under a directory nameda=b, or behind a mistyped key, is silently skipped (declared-unverified, exit 0), andrepo_shape.link_manifest_pathlets a source this user cannot enter (keyed,SHAPE_PIN_SOURCE_<LINK>or a sibling checkout) end the naming gate in aPermissionErrortraceback before Python 3.14 #338, templates/assembly-root/scripts/validate-pins.py: a bare--pin-source <path>whose path holds an=is read as<product>=<path>(raw.partition("=")), so a stand-in clone under a directory nameda=bis never consulted and the pin's digest silently goes togh apiand askip(pins ok, exit 0), or, when the text before the=is a declared pin's name, to aFileNotFoundErrortraceback #295). - A bare value in a chain of three or more links, which answers for every link without a more specific source (a separate follow-up from the same review).
--pin-source ""and--link-source ""as bare values are the same defect for the bare spelling; the fix for this issue should cover them, and the table above does not claim to have run them.
Related: #338 and the PR that fixes it (fix/link-source-values); #312 and #295 (validate-pins.py's --pin-source).
Activity
validate-repository-naming.py, repo_shape.py: a `--link-source` value…
brettheap commentedon Oct 14, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-14T22:35:48Z, for #442
Logged in
lanes/log/openRepoShape-5.mdatbf02d58338386a10c259c7e829b13fac65fa1444.The three reads (lane-collision-protocol Rule 1):
scaffold-project.py and adopt-project.py: `--pin-source ''` is refuse…
Merge main 66267f0 (#589, #582, #576 and eleven more) into fix/540-pi…
scaffold-project.py and adopt-project.py: a pin records `digest_sourc…
validate-repository-naming.py: a `--link-source` key is the longest c…
validate-pins.py: a `--pin-source` key is the longest declared pin be…