Repository navigation
scaffold-project.py --referent-chain writes each middle link into project.yaml as typed (naming_block, scripts/shape_materialize.py:1010-1011) and checks none, so a link holding # scaffolds all three repositories, exits 0, and pushes a manifest the project's own validators refuse as yaml-unparsable, and a link holding ' or ] is recorded as a different chain #251
Description
Lane: openreposhape-5 (openRepoShape-5)
Found by this lane's adversarial review of #213's fix (F2 and N4). Pre-existing on main 54aa69a. The review reached it through naming_block directly; this issue runs it through scaffold-project.py, where it is a manifest the project's own validators refuse, written after all three repositories exist and both legs are pushed.
What is wrong. scaffold-project.py --referent-chain a,b,c splits the value on commas and strips each link (scaffold-project.py:456), and naming_block writes the links into the manifest with a bare ", ".join and no quoting: lines.append(f"{indent} {CHAIN_RECORD_FIELD}: [" + ", ".join(found.referent.chain) + "]") (scripts/shape_materialize.py:1010-1011). Nothing checks what a MIDDLE link looks like. _check_referent_chain (scaffold-project.py:462-481) refuses only a broken resolution; _chain_shape_problem (scripts/repo_shape.py:1408-1430) asks the chain's length, a repeated link, the first link (it must be a pin this project holds) and the last (it must be the referent the name claims), and link_pins_from_trees (:2207) leaves a link whose tree is not on the disk out of the answer, which resolve_referent reads as declared-unverified, a warning. So a link holding #, a quote, ] or : is written into a flow sequence as typed, and the reader (_strip_comment, _split_flow) reads it as syntax.
SHAPE=<openRepoShape checkout>; TMP=$(mktemp -d)
GIT='git -c user.name=T -c [email protected]'
git init -q -b main "$TMP/layer" && cd "$TMP/layer"
printf 'schema_version: 1\nkind: project-manifest\nneutral_product_pins:\n - openDox\n' > project.yaml
git add -A && $GIT commit -qm seed && COMMIT=$(git rev-parse HEAD)
n=0
for CHAIN in 'openXdox,openDox' "openXdox,it's,openDox" 'openXdox,a #b,openDox'; do
n=$((n+1)); cd "$TMP"
python3 "$SHAPE/scaffold-project.py" --org codexSoft --project codexDox \
--elected-by 'T H' --elected-on 2026-09-05 --pin "openXdox@$COMMIT" --pin-source "$TMP/layer" \
--referent-chain "$CHAIN" --local-remote-dir "$TMP/remotes$n" --work-dir "$TMP/work$n" >"$TMP/out$n" 2>"$TMP/err$n"
echo "--referent-chain '$CHAIN': scaffold exit $?"
grep -a -h -m1 'chain .* is broken' "$TMP/err$n" | cut -c1-120
grep -n '^ referent_chain:' "$TMP/work$n/codexDox/project.yaml"
( cd "$TMP/work$n/codexDox" && python3 scripts/validate-manifest.py 2>&1 | grep -a -v '^WARNING' | cut -c1-150; echo "validate-manifest.py exit ${PIPESTATUS[0]}" )
doneObserved on main 54aa69a (<TMP> for the temporary directory):
--referent-chain 'openXdox,openDox': scaffold exit 0
163: referent_chain: [openXdox, openDox]
manifest ok: codexDox (codexdox), 3 legs
validate-manifest.py exit 0
--referent-chain 'openXdox,it's,openDox': scaffold exit 0
WARNING the declared chain openXdox → it's → openDox is broken (openXdox declares openDox, not it's); the direct pin
163: referent_chain: [openXdox, it's, openDox]
manifest ok: codexDox (codexdox), 3 legs
validate-manifest.py exit 0
--referent-chain 'openXdox,a #b,openDox': scaffold exit 0
WARNING the declared chain openXdox → a #b → openDox is broken (openXdox declares openDox, not a #b); the direct pin
163: referent_chain: [openXdox, a #b, openDox]
REFUSED yaml-unparsable: <TMP>/work3/codexDox/project.yaml: not a flow collection: '[openXdox, a'
Remediation: run `git submodule update --init --recursive`, then `python3 scripts/validate-pins.py`. If the PIN itself is stale, advance the gitlink,
validate-manifest.py exit 2
All three repositories exist and the assembly root's main already holds that line (git -C <TMP>/remotes3/codexDox.git show main:project.yaml). Row 1 is the control. Row 2: the link it's reads back as it's, openDox, one link, so the manifest records a different chain than the operator declared (the reader's quote-in-a-plain-item defect, #249), and the validator says the chain "ends at it's, openDox". Row 3 is the worst: the # starts a comment, the flow sequence is cut off, and validate-manifest.py and validate-repository-naming.py both refuse the new project's own manifest, with a remediation about submodules that has nothing to do with it. The scaffold's own WARNING calls the chain broken and the run still exits 0, and --dry-run on the a #b chain exits 0 with only that WARNING, creating nothing.
Expected. A --referent-chain link that is not a repository name is refused by name before anything is created, under --dry-run as well, the way _check_declared_names refuses the rest of the declaration; or each link is written through a quoting writer (adopt-project.py's y() is the one this repository has) so that whatever the operator types reads back as typed. Checking the link against the repository-name pattern is the smaller change and keeps the manifest plain; quoting alone would still write a chain the scaffold itself calls broken. A test scaffolds with a link holding # and one holding ' and asserts the refusal (or the round trip), and that no repository exists after a refusal.
Reach. referent_chain is written by this one path: scaffold-project.py:938-939 is the only caller that passes a chain (adopt-project.py:2876-2879, update-shape.py and scripts/family.py write none), and the operator types the chain on the command line. A GitHub repository name holds no #, quote or ], so a real chain does not reach it; a pasted note or a slip does. PR #244's body says the same, and that is why this was left out of it: it is a gap in a writer that trusts its input, not a reader fault.
Found by. handoffs/openRepoShape/attachments/lane-openRepoShape-5/review213-report.md in opensoft/brett-wip (F2 and N4); impl213-report.md of the same directory names the four flow writers. The scaffold run above is new for this issue.
Not claimed.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 11, 2026
CLAIMED — lane openRepoShape-5, session e62c2fd7-176d-429d-89fb-0653dd08ad5f@Eagle, 2026-10-11T21:45:23Z, for #251
Logged in
lanes/log/openRepoShape-5.mdat50329e3f7e4f1ff7afe26e651e2f47ff6bb8f7dd.The three reads (lane-collision-protocol Rule 1):
fix round 1 (#251): the `chain-link-malformed` refusal prints the cha…
scripts/repo_shape.py: a block scalar's record carries its key and it…
Merge origin/main (60588d5) into fix/yaml-quote-boundaries (#249, #250)
Merge origin/main into fix/scaffold-pin-product-collisions: #271 (23e…
repo_shape.py: a quote opens a quoted scalar only where one begins an…
Merge origin/main (d94d155: #251 via #271, #206 via #221, #207 via #222…
Merge origin/main 60588d5 into fix/adopt-root-kept-symlinks: #214, #217…
Merge origin/main (60588d5) into fix/adopt-plan-quote-yaml-keywords
scaffold-project.py and adopt-project.py ask the project's YAML reade…