Repository navigation
--pin-source in scaffold-project.py and adopt-project.py: accepted without --pin, and committed into digest_source as typed #540
Description
A --pin-source that nothing reads is accepted silently, even a path that does not exist. One that is read is written into the committed pin as typed, so an absolute path commits the machine's own directory.
From the v1.1.0 triage of the v1.0.0 known limits on #457 and #459. One pull request covers the lines below.
Lines
-
--pin-sourceis written as typed into the committeddigest_source, so an absolute path commits the machine's directory. Where: scripts/shape_materialize.py:2388declared_pin_values. Effort S; all. On main3121945:digest_source = f"local-clone ({args.pin_source})"is unchanged; the flag is uncommon, and the harm is privacy-shaped; same field as scaffold-project.py--pin-source <path>: the path is written as it stands into the new root'scontracts/<product>-pin.yaml(digest_source: local-clone (<path>), a bare placeholder) and is asked nothing first, so a clone at a path holding a line break scaffolds, exit 0, a pin file with a line of the path's choosing, and one at a path that is not UTF-8 creates all three repositories and then dies inwrite_lfwith aUnicodeEncodeErrortraceback, exit 1 #450. (source) - scaffold-project.py and adopt-project.py
plan: a--pin-sourcethat nothing reads (no--pin, and for the scaffold no--referent-chainlink) is accepted in silence, even a path that does not exist, so--dry-runsaysnothing was created.andplanwrites a plan, each exit 0 with no word that the flag changed nothing, where the root's ownvalidate-pins.pynotes such a value since #295 #451
Rides along (backlog; tick it here if the same change covers it)
- scaffold-project.py
--pin-source <path>: the path is written as it stands into the new root'scontracts/<product>-pin.yaml(digest_source: local-clone (<path>), a bare placeholder) and is asked nothing first, so a clone at a path holding a line break scaffolds, exit 0, a pin file with a line of the path's choosing, and one at a path that is not UTF-8 creates all three repositories and then dies inwrite_lfwith aUnicodeEncodeErrortraceback, exit 1 #450 - L2-15: the scaffold and adopt spell
neutral_product_pins:entries differently (source) - L2-16: the neutral-product-pin.yaml header says only the scaffold renders the file (source)
Each line above is marked → this issue on its tracking issue. Tick it there too when this closes.
The lines as written on the tracking issues
AT-scaffold N7:
--pin-sourcewrites the path as typed into the committed pin file'sdigest_source(local-clone (<path>), scaffold-project.py:421), so an absolute path commits the scaffolding machine's own directory.
— #459, body
L2-15 (P3; pairs with L2-14 on #457): once #515 and #517 both land, the scaffold and adopt spell some
neutral_product_pins:entries differently.
- The scaffold (
scaffold-project.py:1150-1169at 678ecfe) writes an entry bare whenever the project's reader reads it back.- Adopt (adopt-project.py:
executewrites eachneutral_product_pins:entry so it reads back as the textplanrecorded, soplan --pin 007@<commit>no longer saysadoption verifiedover a root whose ownvalidate-pins.pyrefusesentry 7(#514) #515) quotes any name that begins with a digit or-.- So the two tools spell 106,904 of 377,891 admitted names differently, for example
0x1F,1_000,1e3,3dGlassand-x.- The project's own reader reads every one back, and no gate fails.
- A standard YAML reader (PyYAML
safe_load) misreads 7,381 of the scaffold's spellings against 967 of adopt's:0x1Fas 31,1_000as 1000,yesas True.- Fix: one entry spelling, with
y's plain-scalar rule, inscripts/shape_materialize.py, used by both tools. That is scaffold-project.py:--pinwrites eachneutral_product_pins:entry, and the pin file'sproduct:, so they read back as the text given, so--pin 007@<commit>no longer exits 0 over a root whose ownvalidate-pins.pyrefusesentry 7(#516) #517's own "possible follow-up", and it would also close L2-14.- Repro:
tools/l2rv516-twotools.pyandtools/l2rv516-twotools-M2.json, underhandoffs/xFactory/attachments/lane-openRepoShape-2/review517-678ecfe/in opensoft/brett-wip.
L2-16 (nit, at the next touch of the template): the header of
templates/assembly-root/contracts/neutral-product-pin.yaml(lines 7-10) says only the scaffold renders the file.adopt-project.py executerenders it too.
— #459, comment
Activity
brettheap commentedon Oct 14, 2026
CLAIMED — lane openRepoShape-2, session 81650e29-c906-4fe8-96c9-55580bfe0c44@Eagle, 2026-10-14T22:27:35Z, for #540
Logged in
lanes/log/openRepoShape-2.mdat4102849e674e2f890b9dd610fdf362804d7b6965.The three reads (lane-collision-protocol Rule 1):
adopt-project.py: `check` holds a plan's `digest_source:` to `local-c…
tests: the two `not-utf-8` clone rows skip where the filesystem refus…
scaffold-project.py and adopt-project.py: `--pin-source ''` is refuse…
validate-repository-naming.py, repo_shape.py, validate-pins.py: a bar…
adopt-project.py: `plan` records `local-clone (<path>)` in the plan a…
Merge origin/main 55faad2 (#591) into fix/540-pin-source-unread, so t…
validate-family.py and family.py: a gitlink no section of HEAD's `.gi…