Repository navigation
Description
Goal: validate-pins.py reads a --pin-source key as the naming gate has read a --link-source key since #980 (the longest declared pin before an = that leaves a path after it), so a pin whose name holds = can be a key, and the sentence saying the two copied tools read [PRODUCT=]PATH one way is true.
State
templates/assembly-root/scripts/validate-pins.py (PinSources, :1466) cuts every --pin-source value at its FIRST =: key, sep, path = typed.partition("=") at :1522, then names.get(pin_product_key(key)) at :1523. Two more places cut at the first = on their own: the no-path refusal at :1538 (typed.partition("=")[2]) and read_as_path at :1557 (typed.partition("=")[0]).
Since #1044 (#980, 82fc86752) the naming gate reads a --link-source key as the longest chain link before an = that leaves a path after it, read whole, and a value that ends at a link names no path (LinkSources._read_source, scripts/validate-repository-naming.py:401-444). #1044 left validate-pins.py as its own change, and rv980 ruled that fine.
The words that say the first-= rule are all in the pinned copy:
- the class docstring,
:1470-1482("the text before the first=is a PRODUCT only when ..."); :1496-1501, whose sentence at:1498-1499says "the two copied tools read[PRODUCT=]PATHone way over ASCII alone";- the
--pin-sourcehelp,:2105-2116, anddocs/cli.md:1205, which is that help as generated.
What happens
For a declared pin whose name holds =, --pin-source open=y=<tree> is a bare PATH here, where the gate reads it as open=y's tree. PinSources(["open=y=/p"], ["open=y"]).reading is {'open=y=/p': None}. Run through _check_neutral_product_pins with a pin open=y and its pin file contracts/open=y-pin.yaml (drafting probe, hand-written fixture):
open=y=<tree>givesFINDING neutral-pin-source-unreadable: contracts/open=y-pin.yaml: open=y=<tree> (--pin-source) could not answer for opensoft/open=y @ <commit>: no such directory, then "It was read as a PATH:openis not a declared neutral-product pin (declared: open=y)";- the same tree typed bare recomputes the digest:
open=y: pin commit <12 hex> digest recomputes (--pin-source).
With open and open=y both declared, the first = gives open=y=<path> to open, with the path y=<path>.
So the sentence at :1498-1499 is no longer true for a name holding =: since #980 the two tools read [PRODUCT=]PATH one way only for a name with no =.
This is consistency, not a live failure.
- No scaffold writes such a pin.
PIN_ARG_RE(scripts/shape_materialize.py:3226) admits[A-Za-z0-9_.-]names, optionally owner-qualified, andscaffold-project.py --pinandadopt-project.py plan --pinshare it. Only a hand-editedproject.yamldeclares one:validate-manifest.py's_not_a_name(:254) refuses only an entry that is not text, is blank or is not printable. - A pin's digest stops a wrong source from passing. A wrong tree cannot match it, so this reading turns a wrong source into a finding, as above, and never into a pass.
- rv980 ruled it fine as its own change, on validate-repository-naming.py: a
--link-sourcekey is the longest chain link before an=that leaves a path after it, so the offer the gate prints for a link holding=verifies that link when typed as printed (#980) #1044.
Direction
-
Read the key in
PinSources.__init__as_read_sourcedoes for links: the LAST=whose text before it names a declared pin bypin_product_key, with a non-empty path after it, ends the key. The key is read whole (never stripped, never cut at a/), and the pin is spelled as the manifest spells it. Where two declared pins both begin the value, the longer wins:open=y=<path>isopen=y's andopen=<path>isopen's. A value that ends at a declared pin,open=y=, names no path and is refusedpin-source-no-path(exit 2), asopenGlass=is (scripts/validate-repository-naming.py_link_sources_from_args(:406) and templates/assembly-root/scripts/validate-pins.pyPinSources(:409): a key with an empty path (--link-source openXdox=,--pin-source openXdox=) isPath(""), which is the current directory, so run from a project root the naming gate reads the project's OWNproject.yamlas the link's declaration and reports a chain that holds as broken, a FINDING (exit 1) for a name with no direct pin #442). Any other value is a bare PATH, whole. -
Make
:1538and:1557use what__init__read, so the three do not each cut at the first=. -
Reword the four places under State.
:1496-1501can say the two read[PRODUCT=]PATHone way, with no exception left.docs/cli.mdis regenerated from the help (tests/test_cli_reference.py). -
It is a pinned copy:
COPIED_VERBATIM(scripts/shape_materialize.py:445-446) carriesscripts/validate-pins.py, so the change takes one upgrade row in every existing root (update-shape.py checklistsupstream-changedforscripts/validate-pins.py); item 5 adds a second. -
The gate's
LinkSourcesdocstring (scripts/validate-repository-naming.py:266-282) describes this file's reading and is wrong in two ways. Fix both in the same change.:269-270says "That file still ends a key at the first=". That becomes false when this lands.:272-282says this file "still keys--pin-source PRODUCT=bycasefold()", so that--pin-source openss=answers for a declared pin spelledopenand a sharp s (U+00DF). That is already false on main:PinSources.__init__(:1507,:1523) andresolve_neutral_pin_source(:1602) key bypin_product_key(lower()) since validate-pins.py: an unsearchablecontracts/still ends in a PermissionError, an unreadable pin is named by its absolute path twice, and a workflow name or a pin entry's control character reaches stderr raw #712 (9f235da2e, validate-pins.py and repo_shape.py: a pin, the manifest or a shape copy the gate cannot reach or read is refused by name, relative to the root, once and with its cause's advice, and every name and path it prints is spelled (#712) #827), andPinSources(["openss=/p"], ["open" + U+00DF])reads a bare PATH. validate-repository-naming.py: a--link-sourcekey is the longest chain link before an=that leaves a path after it, so the offer the gate prints for a link holding=verifies that link when typed as printed (#980) #1044 reworded around the sentence and kept it; it dates from1babe42c5. The clause at:267-269, "one way OVER ASCII ONLY (scripts/repo_shape.py: the chain readers identify a link, a declared pin and a--link-sourcekey bycasefold()(twelve calls,:1207to:2428), where #275's fix (PR #409, 6494714) makes a product's identitypin_product_key(lower(), the pin file's own fold), soopenßandopenssare two products to the pin validator and one link to the chain: a holder's tree that declaresopenssverifies a chain that saysopenß, a project that pinsopenssverifies a chain that begins atopenß, a--link-source openss=answers for the linkopenß,link_pins_from_treeskeeps one entry for the pair, and a chain that names both is refused as a cycle #444)", is stale for the same reason.
That file is a pinned copy too (
COPIED_FROM_SHAPE,scripts/shape_materialize.py:439-443), so correcting it adds a second upgrade row,scripts/validate-repository-naming.py, applied by the sameupdate-shape.py apply. Leaving "still ends a key at the first=" about a file that no longer does would be the pattern of rv980's NIT-2 on validate-repository-naming.py: a--link-sourcekey is the longest chain link before an=that leaves a path after it, so the offer the gate prints for a link holding=verifies that link when typed as printed (#980) #1044 again. rv980's checklist line: when a pinned copy's reader changes, grep the other pinned copies for sentences saying the two tools "read one way".
Tests go beside the #295 rows in tests/test_neutral_pin_validator.py (:201-307) and the #442 rows in tests/test_link_source_chain_defaults.py (:367-417). A pin holding = cannot be scaffolded, so a row hand-writes the neutral_product_pins: entry and its pin file (= is legal in a file name on all three platforms, as standin_at's docstring says).
Verify
- With a declared pin
open=y,--pin-source open=y=<tree>recomputes that pin's digest, as--pin-source openGlass=<tree>does today. Withopenandopen=yboth declared, each given its own tree,open=y=<tree>isopen=y's andopen=<tree>isopen's, and both verify. --pin-source open=y=is refusedpin-source-no-path, exit 2, in the wordsopenGlass=gets.- With no
=in any declared pin the run is byte for byte as before: compare stdout, stderr and exit code on the base and the head over a table of values and pin lists (rv980 did it for validate-repository-naming.py: a--link-sourcekey is the longest chain link before an=that leaves a path after it, so the offer the gate prints for a link holding=verifies that link when typed as printed (#980) #1044: 800 runs, none differing), with capitals, a leading blank, an owner (opensoft/),./openGlass=x/openGlassand the 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 rows. tests/test_cli_reference.pyandtests/test_pinned_copy_text.pypass, andtests/test_neutral_pin_validator.pyand the scripts/validate-repository-naming.py_link_sources_from_args(:406) and templates/assembly-root/scripts/validate-pins.pyPinSources(:409): a key with an empty path (--link-source openXdox=,--pin-source openXdox=) isPath(""), which is the current directory, so run from a project root the naming gate reads the project's OWNproject.yamlas the link's declaration and reports a chain that holds as broken, a FINDING (exit 1) for a name with no direct pin #442 rows intests/test_link_source_chain_defaults.pywith the new rows.- From a root scaffolded before the change,
update-shape.py checklistsupstream-changedforscripts/validate-pins.py(and forscripts/validate-repository-naming.pyif item 5 is done),apply --yes --branch ...exits 0, the root's validators printpins okandmanifest ok, and a freshcheckprints every rowunchanged(as rv980 measured for validate-repository-naming.py: a--link-sourcekey is the longest chain link before an=that leaves a path after it, so the offer the gate prints for a link holding=verifies that link when typed as printed (#980) #1044).
Found by lane 5's independent review of #1044 (#980), rv980 (#1044 issuecomment-6288391970).
Milestone: v1.2.0 (placement is lane 3's call).
Not claimed.
Lane: openreposhape-5 (openRepoShape-5)
Activity
brettheap commentedon Oct 20, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-20T10:50:19Z, for #1053
Logged in
lanes/log/openRepoShape-5.mdat6f7c947a82b337fefc0c3774d7519d7c3a150b98.The three reads (lane-collision-protocol Rule 1):
tests/test_chain_remedy_callers.py: three rows hold #980's unchanged …
validate-pins.py: a `--pin-source` key is the longest declared pin be…