Repository navigation
scaffold-project.py and adopt-project.py plan: a --pin-source that nothing reads (no --pin, and for the scaffold no --referent-chain link) is accepted in silence, even a path that does not exist, so --dry-run says nothing was created. and plan writes a plan, each exit 0 with no word that the flag changed nothing, where the root's own validate-pins.py notes such a value since #295 #451
Description
Lane: openreposhape-5 (openRepoShape-5)
(lane openRepoShape-5, 2026-10-12T18:55:05Z)
Found by lane 5's review of fix/adopt-pin-writes-pin-file at 7a94b6b (the fix for #273 and #339), its N5. This is #339's third decision, which that PR leaves open, so that closing #339 loses nothing. The scaffold half is pre-existing (origin/main 45e01f4); the adopt half is new with that PR, which gives adopt-project.py plan the scaffold's --pin-source. Reproduced on both, and on that branch's fix-round head 74ce4d9. Not claimed.
What is wrong. --pin-source <path> is read by declared_pin_values for each --pin (the digest), and, in the scaffold, by link_pins_from_trees as the default source of each --referent-chain link. With neither, nothing reads it: the run neither stats the path nor says anything about it. A person who typed --pin-source meaning to pin, and forgot the --pin, gets a project that declares no descent and a clean exit, and the run's own output never mentions the flag. The project's validate-pins.py already says this of its own --pin-source (#295): note --pin-source <value>: not used — <why>. (_note_unused_pin_sources), a note and never a finding.
SHAPE=<checkout of fix/adopt-pin-writes-pin-file> # the scaffold rows hold on main too
STUB=$(mktemp -d); printf '#!/bin/sh\nexit 97\n' > "$STUB/gh"; chmod +x "$STUB/gh"
export PATH="$STUB:$PATH" GH_TOKEN=bogus GH_CONFIG_DIR=$(mktemp -d)
export GIT_AUTHOR_NAME=T [email protected] GIT_COMMITTER_NAME=T [email protected]
D=$(mktemp -d)
python3 "$SHAPE/scaffold-project.py" --org testorg --project Atlas --elected-by 'T H' \
--elected-on 2026-09-02 --pin-source "$D/no-such-clone" \
--local-remote-dir "$D/remotes" --work-dir "$D/work" --dry-run | tail -n 1; echo "exit ${PIPESTATUS[0]}"
git init -q -b main "$D/Thing" && cd "$D/Thing" || exit 1
mkdir -p src/app specs/001 && printf 'print(1)\n' > src/app/main.py && printf '# spec\n' > specs/001/spec.md
printf '# Thing\n' > README.md && git add -A && git commit -qm seed && cd "$D" || exit 1
python3 "$SHAPE/adopt-project.py" plan --source "$D/Thing" --project Atlas --org testorg \
--elected-by 'T H' --elected-on 2026-09-02 --out plan.yaml \
--pin-source "$D/no-such-clone" > /dev/null; echo "exit $?"; grep -c no-such-clone plan.yamlObserved, Python 3.12.3:
| run | origin/main 45e01f4 | the #273 branch (74ce4d9) |
|---|---|---|
scaffold-project.py --pin-source <missing> --dry-run, no --pin |
exit 0, --dry-run: nothing was created., no word of the flag |
the same |
adopt-project.py plan --pin-source <missing>, no --pin |
exit 2, unrecognized arguments: --pin-source (no such flag) |
exit 0, plan written, the path in it 0 times, no word of the flag |
What it should do. #339 asked; the author decides:
- refuse it (
pin-source-unused, exit 2, before anything exists,--dry-runalike): "--pin-source names the clone a--pin's digest is read from, and no--pin(and no--referent-chainlink) was given", with the two remedies (add the--pin, or drop the flag). Strict, and consistent with the tools refusing what they cannot use; - note it (one
NOTE --pin-source <path>: not used — no --pin reads it.line, exit unchanged), as the root'svalidate-pins.pydoes (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). Mild, and the same words in all three tools; - leave it and say so in each tool's
--helpfor--pin-source(docs/cli.mdregenerates), and on scaffold-project.py:pin_digest_from_sourcecatches onlyRefusal, so a--pin-sourcethat does not exist, is a file, or sits under a parent this user cannot enter ends--dry-runand the real run alike in aFileNotFoundError,NotADirectoryErrororPermissionErrortraceback (exit 1), where a directory that is not a clone is thepin-source-unreadablerefusal (exit 2) with its remediation #339.
Whichever it is, it belongs in ONE place both tools call (scripts/shape_materialize.py, beside declared_pin_values, once the #273 PR lands), and the scaffold's --referent-chain must count as a reader, since a chain link with no keyed source reads the bare --pin-source (link_pins_from_trees).
How to test. In tests/test_pin_source_unreadable.py (#339's file, which drives scaffold-project.py --dry-run, its real run and adopt-project.py plan through one helper), add --pin-source <missing> with no --pin: under "refuse", exit 2 and nothing made; under "note", exit 0 with the one line, and the line absent when a --pin (or, for the scaffold, a --referent-chain) is given. The session gh guard stays the gh that fails if called: no row needs one.
Not in this issue.
- A
--pin-sourcethat a--pinreads and that cannot answer: scaffold-project.py:pin_digest_from_sourcecatches onlyRefusal, so a--pin-sourcethat does not exist, is a file, or sits under a parent this user cannot enter ends--dry-runand the real run alike in aFileNotFoundError,NotADirectoryErrororPermissionErrortraceback (exit 1), where a directory that is not a clone is thepin-source-unreadablerefusal (exit 2) with its remediation #339, fixed in the adopt-project.py--pin <name>is accepted byplan,checkandexecute("adoption verified"), but writes only the name intoneutral_product_pins:and nocontracts/<name>-pin.yaml, so the adopted root's ownvalidate-pins.py(and itsvalidate.yml) refuses withneutral-pin-missingfrom the first run #273 PR. - A
--pin-sourcepath no file can hold: the adopt-project.py--pin <name>is accepted byplan,checkandexecute("adoption verified"), but writes only the name intoneutral_product_pins:and nocontracts/<name>-pin.yaml, so the adopted root's ownvalidate-pins.py(and itsvalidate.yml) refuses withneutral-pin-missingfrom the first run #273 PR (adopt) and its follow-up for the scaffold.
Activity
adopt-project.py: `plan --pin` takes `product@<40 hex>` and `execute`…
brettheap commentedon Oct 14, 2026
CLAIMED — lane openRepoShape-2, session 81650e29-c906-4fe8-96c9-55580bfe0c44@Eagle, 2026-10-14T22:28:19Z, for #451
Logged in
lanes/log/openRepoShape-2.mdat180f0f2a28b138f7a71aa12c8e6def50b014fff9.The three reads (lane-collision-protocol Rule 1):
adopt-project.py: `plan` asks `pin-source-unused` first, from the fla…
tests/test_adopt_pins.py: the no-raw-character check of `test_a_pin_s…
scripts/shape_materialize.py: the `pin-source-unused` refusal says `-…
Merge origin/main 55faad2 (#591) into fix/540-pin-source-unread, so t…