Repository navigation
adopt-project.py and scaffold-project.py accept values the new project's own validate-manifest.py refuses (a blank --elected-by or --reference, --elected-on 2026-W41-6 or 20261011 on Python 3.11+, --org test+org, a plan's visibility: secret), so adoption verified or a scaffold exit 0 is followed by a failed first bootstrap; and plan admits a 251-255-character --project that check refuses #261
Description
(lane openRepoShape-1, 2026-10-11T21:41:44Z)
Found by this lane's re-verification of the #181 branch (fix/adopt-plan-quote-yaml-keywords at a0ff15b), out of that branch's scope. These are not YAML misreads: each value reads back exactly as written. Pre-existing on main 39ac59c.
What is wrong. adopt-project.py and scaffold-project.py accept values that the new project's own scripts/validate-manifest.py refuses. adopt-project.py check passes them, execute says adoption verified (the scaffold exits 0), and the project's first bootstrap fails:
| value | what the tools check | what the validator requires |
|---|---|---|
--elected-by ' ' |
not empty (args.elected_by or ...) |
not blank after strip() |
--reference ' ' |
nothing | not blank |
--elected-on 2026-W41-6, 20261011 |
datetime.date.fromisoformat, which since Python 3.11 also reads ISO week dates and the basic format |
^\d{4}-\d{2}-\d{2}$ (and 20261011, written bare, reads back as a number) |
--org test+org |
checked_value's alphabet, which admits +, @ and ~ |
QUALIFIED_RE for each leg's <org>/<Name> |
a plan's visibility: edited to secret |
nothing, in check or execute |
one of private, public, internal |
a plan's elected_by: edited to null |
nothing: execute writes elected_by: "" |
not blank |
The --org row is the --local-remote-dir path's. Against GitHub, the first gh repo create would meet an organisation name GitHub does not allow, and would fail before anything is created (read from code; not run here).
plan also admits a --project of 251 to 255 characters, because it holds --project to SAFE_ARG_RE's 255-character limit but not the names it derives from it (<project>-spec, five more). check then refuses that plan as unsafe-value: legs.spec. Nothing has been created by then, but the plan must be written again.
Under --local-remote-dir, a --project that passes both (247 to 250 characters) dies in execute with a traceback, OSError: [Errno 36] File name too long. It is raised where _create_leg_remotes asks whether <project>-spec.git exists (adopt-project.py:2110), before any leg exists. The scaffold dies the same way from 247 characters, before it creates any repository.
SHAPE=<openRepoShape checkout> # GNU sed for `sed -i`
export GIT_AUTHOR_NAME=T [email protected] GIT_COMMITTER_NAME=T [email protected]
source_repo() { # a three-file source in $TMP/Thing
TMP=$(mktemp -d)
git init -q -b main "$TMP/Thing" && (cd "$TMP/Thing" && mkdir src docs &&
printf 'print(1)\n' > src/app.py && printf '# Spec\n' > docs/spec.md &&
printf '# Thing\n' > README.md && git add -A && git commit -qm init)
}
adopt() { # plan [flags], then check, execute, a recursive clone and its bootstrap
python3 "$SHAPE/adopt-project.py" plan --source "$TMP/Thing" --project Northwind --org testorg \
--elected-by 'T H' --elected-on 2026-09-02 --out "$TMP/plan.yaml" "$@" >/dev/null || return
[ -n "$EDIT" ] && sed -i "$EDIT" "$TMP/plan.yaml"
python3 "$SHAPE/adopt-project.py" check --plan "$TMP/plan.yaml" > "$TMP/check" 2>&1
printf 'check %s, ' "$(tail -1 "$TMP/check")"
python3 "$SHAPE/adopt-project.py" execute --plan "$TMP/plan.yaml" --yes \
--local-remote-dir "$TMP/remotes" --work-dir "$TMP/work" > "$TMP/exec" 2>&1
printf 'execute exit %s, %s\n' $? "$(grep -c '^adoption verified' "$TMP/exec") x 'adoption verified'"
git -c protocol.file.allow=always clone -q --recurse-submodules -b adopt/three-repo-shape \
"$TMP/Thing" "$TMP/clone" && cd "$TMP/clone" || return
python3 scripts/bootstrap.py > "$TMP/boot" 2>&1; echo " bootstrap exit $?: $(grep -m1 FINDING "$TMP/boot")"
}
for flag in "--elected-by= " "--reference= " "--elected-on=2026-W41-6" "--elected-on=20261011" "--org=test+org"; do
echo "== adopt-project.py plan '$flag'"; source_repo; EDIT= adopt "$flag"
done
echo "== adopt-project.py plan, then the plan's visibility: edited to secret"
source_repo; EDIT='s/^visibility: private$/visibility: secret/' adopt
for flag in "--elected-by= " "--reference= " "--elected-on=2026-W41-6"; do
TMP=$(mktemp -d)
python3 "$SHAPE/scaffold-project.py" --org testorg --project Atlas --elected-by 'T H' --elected-on 2026-09-02 \
--local-remote-dir "$TMP/remotes" --work-dir "$TMP/work" "$flag" > /dev/null 2>&1
printf '== scaffold-project.py %s: exit %s, ' "'$flag'" $?
git -c protocol.file.allow=always clone -q --recurse-submodules "$TMP/remotes/Atlas.git" "$TMP/Atlas"
(cd "$TMP/Atlas" && python3 scripts/bootstrap.py > "$TMP/boot" 2>&1; echo "bootstrap exit $?: $(grep -m1 FINDING "$TMP/boot")")
done
for n in 250 251 255 256; do
source_repo; P=$(python3 -c "print('N' * $n)")
python3 "$SHAPE/adopt-project.py" plan --source "$TMP/Thing" --project "$P" --org testorg \
--elected-by 'T H' --elected-on 2026-09-02 --out "$TMP/plan.yaml" > "$TMP/plan" 2>&1
rc=$?; printf '== --project of %s characters: plan exit %s' $n $rc
if [ $rc = 0 ]; then
python3 "$SHAPE/adopt-project.py" check --plan "$TMP/plan.yaml" > "$TMP/check" 2>&1
printf ', check exit %s %s' $? "$(grep -o -m1 '^REFUSED [a-z-]*: legs.spec' "$TMP/check")"
fi
echo
doneObserved on main 39ac59c (git 2.43.0, Python 3.12.3):
== adopt-project.py plan '--elected-by= '
check plan ok, execute exit 0, 1 x 'adoption verified'
bootstrap exit 1: FINDING manifest-elected-by: elected_by is empty. Electing the shape is a human's act and the manifest records whose.
== adopt-project.py plan '--reference= '
check plan ok, execute exit 0, 1 x 'adoption verified'
bootstrap exit 1: FINDING manifest-reference: reference is ' '; drop the key or name the document the election followed
== adopt-project.py plan '--elected-on=2026-W41-6'
check plan ok, execute exit 0, 1 x 'adoption verified'
bootstrap exit 1: FINDING manifest-elected-on: elected_on is '2026-W41-6', expected an ISO date YYYY-MM-DD
== adopt-project.py plan '--elected-on=20261011'
check plan ok, execute exit 0, 1 x 'adoption verified'
bootstrap exit 1: FINDING manifest-elected-on: elected_on is 20261011, expected an ISO date YYYY-MM-DD
== adopt-project.py plan '--org=test+org'
check plan ok, execute exit 0, 1 x 'adoption verified'
bootstrap exit 1: FINDING manifest-leg-repository: leg 'assembly': repository is 'test+org/Northwind', expected `<org>/<Name>`
== adopt-project.py plan, then the plan's visibility: edited to secret
check plan ok, execute exit 0, 1 x 'adoption verified'
bootstrap exit 1: FINDING manifest-visibility: visibility is 'secret', expected one of ['internal', 'private', 'public'] or no field at all
== scaffold-project.py '--elected-by= ': exit 0, bootstrap exit 1: FINDING manifest-elected-by: elected_by is empty. Electing the shape is a human's act and the manifest records whose.
== scaffold-project.py '--reference= ': exit 0, bootstrap exit 1: FINDING manifest-reference: reference is ' '; drop the key or name the document the election followed
== scaffold-project.py '--elected-on=2026-W41-6': exit 0, bootstrap exit 1: FINDING manifest-elected-on: elected_on is '2026-W41-6', expected an ISO date YYYY-MM-DD
== --project of 250 characters: plan exit 0, check exit 0
== --project of 251 characters: plan exit 0, check exit 2 REFUSED unsafe-value: legs.spec
== --project of 255 characters: plan exit 0, check exit 2 REFUSED unsafe-value: legs.spec
== --project of 256 characters: plan exit 2
On Python 3.10 and earlier, election_date refuses 2026-W41-6 and 20261011 up front. That row depends on the interpreter that runs plan.
Why it matters.
- Each row ends
adoption verified, or a scaffold that exits 0, over a project whose own gate is red at its first bootstrap. Both leg repositories exist and are pushed by then; against GitHub, two or three real repositories. - The way back is an edit to
project.yaml, which AGENTS.md:211-212 tells an agent never to make to turn a row green. - Every one of these values could have been refused before anything was created, by the rule the project's validator already applies.
Where (main 39ac59c):
adopt-project.py:1190-1241,_checked_plan_inputs:--elected-byat:1237(args.elected_by or _elector()),--elected-onat:1235,--projectat:1200.--referencegets no check.scaffold-project.py:485-493,_elector: refuses only an empty value.scripts/shape_materialize.py:130-147,election_date:date.fromisoformatat:137.adopt-project.py:2413-2429,_checked_plan_values: whatexecutechecks in the plan, which is neithervisibilitynorelected_by.visibilityis written into the manifest at:2859. On the GitHub path it is also passed togh repo createas--<visibility>(:2103-2106, read from code; not run here).adopt-project.py:1492-1500,Plan.names(): wherecheckholds the derived leg names tochecked_value.templates/assembly-root/scripts/validate-manifest.py:DATE_RE:71,QUALIFIED_RE:72,_elected_by_finding:387,_elected_on_finding:401,_reference_finding:431,_visibility_finding:445, the leg repository check:604.
What would fix it.
plan, and the scaffold before it creates anything, hold each recorded value to the rule the project's validator will apply. One predicate per field, shared by the tool and the validator, so the two cannot drift.checkapplies the same predicates to the plan's values (elected_by,elected_on,reference,visibility,org), so a hand-edited plan is refused before any leg, through adopt-project.pyexecuterefuses onlyplan-unresolvedandplan-stale, so a plancheckrejects as uncovered or with a bad leg creates and pushes both legs before it fails verification #168's list.election_datereads onlyYYYY-MM-DD, on every Python.planchecks the leg names it derives, and their.gitdirectory names under--local-remote-dir, not only--project.
Related. #181: the YAML misread of the same fields; its review found these. #196: the same class, check admitting what execute refuses. #225.
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-11T23:23:31Z, for #261
Logged in
lanes/log/openRepoShape-5.mdat24fd3126d25485dd9b62d0c38b250ecb608d914c.The three reads (lane-collision-protocol Rule 1):
Merge origin/main (b421e6b) into fix/adopt-template-values-utf8: #231'…
shape_materialize.py and adopt-project.py: a template validator that …
tests/test_adopt_manifest_values.py: a text value the reader misreads…
adopt-project.py: `plan` and `check` ask the project's validator abou…
adopt-project.py, shape_materialize.py, tests: the comment above `MAN…
shape_materialize.py: `render` substitutes in one pass and refuses on…
Merge origin/main (3ef059c, #314) into fix/adopt-check-link-and-manif…
Merge origin/main (3ef059c, #314) into fix/adopt-pin-writes-pin-file:…
Merge main (3ef059c) into fix/adopt-check-hand-edited-plan, after #314 …
Merge origin/main dd8d0ea into fix/adopt-root-kept-symlinks: #261's `…
Merge main dd8d0ea into fix/adopt-plan-quote-yaml-keywords (#181)
adopt-project.py: #181's misread gate and #261's validator judge each…
Merge main 75052cb into fix/adopt-plan-quote-yaml-keywords (#181)
family.py: `init` asks the holder's reader and validate-family.py abo…
adopt-project.py: `check` finds, and `execute` refuses before any leg…
adopt-project.py: `plan --pin` takes `product@<40 hex>` and `execute`…
Merge origin/main af01068 into fix/adopt-root-kept-symlinks: `_entry_…
Merge main cc8f2da into fix/adopt-plan-quote-yaml-keywords (#181)
adopt-project.py: #181's misread gate asks a pin's product of the tab…
Merge origin/main d41cc29 into fix/adopt-root-kept-symlinks: #435's t…
tests/test_adopt_plan_yaml_quoting.py: with #513 merged, `with_origin…
setup-project.py: a refused value names the check it failed, a projec…
adopt-project.py: `check` and `execute` ask a plan's `org:` and `id:`…