Repository navigation
Description
Lane: openreposhape-5 (openRepoShape-5)
(lane openRepoShape-5, 2026-10-12T19:25:03Z)
Found by lane 5's review of fix/bootstrap-print-name-escaped (the branch for #391), its F1, and reproduced on origin/main 53bee5b. Not claimed. It is #391's bug in the next script over: #391 gives both roots' bootstrap.py an escape and a stdout guard, and siblings.py (the family holder's make siblings, make park and make resume) prints the same first line with the same plain print.
What is wrong. templates/family-root/scripts/siblings.py opens each of its two reports with
print(f"siblings: {name} ({root}) — {len(rows)} member(s)")at _run_placement (:906, make siblings) and dispatch_all (:676, --make <target>, which make park and make resume call), before anything else is said. name is family.yaml's name: as the reader gives it, so:
name: "a\ud83db"reads as a string holding a lone surrogate, which no UTF-8 stdout can write. The run ends in aUnicodeEncodeErrortraceback.validate-family.pynames the value only asFINDING naming-unclassified(exit 1), so the person who runsmake siblingsfirst is told nothing useful, andmake park, which exists to save work, ends before it parks anything.- The line holds a literal
—, so on a stdout that cannot hold it (PYTHONIOENCODING=ascii, or the ANSI code page Windows gives a stdout that is not the console) it raises for EVERY name,InkRouterincluded. - A raw ESC or CR in a name is encodable everywhere and reaches the terminal as the control it is.
The member rows are the same class ([{project}], a member's path, url and branch, sibling.row(), the make target: :397, :401, :449, :451, :476, :478, :486, :621, :645, :695, :850, :864, :866), printed raw. Only the first line is reproduced below: a member row needs a member.
SHAPE=<checkout of origin/main>
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/scripts/family.py" init --org InkRouter --family InkRouter \
--created-by 'Test Human' --created-on 2026-09-04 \
--local-remote-dir "$D/remotes" --work-dir "$D/work" > /dev/null
cd "$D/work/InkRouter" || exit 1
python3 scripts/siblings.py --dry-run > /dev/null 2>&1; echo "control exit $?"
sed -i 's/^name: .*/name: "a\\ud83db"/' family.yaml
python3 scripts/siblings.py --dry-run > /dev/null 2> "$D/e1"; echo "exit $?"; tail -n 3 "$D/e1"
make siblings > /dev/null 2> "$D/e2"; echo "make siblings exit $?"
python3 scripts/siblings.py --make park --dry-run > /dev/null 2> "$D/e3"; echo "exit $?"; tail -n 3 "$D/e3"
make park > /dev/null 2>&1; echo "make park exit $?"; make resume > /dev/null 2>&1; echo "make resume exit $?"
sed -i 's/^name: .*/name: "InkRouter"/' family.yaml
PYTHONIOENCODING=ascii python3 scripts/siblings.py --dry-run > /dev/null 2> "$D/e4"; echo "exit $?"; tail -n 2 "$D/e4"Observed on origin/main 53bee5b, Python 3.12.3:
| run | result |
|---|---|
name: "InkRouter", siblings.py --dry-run (control) |
exit 0, siblings: InkRouter (<root>) — 0 member(s) |
name: "a\ud83db", siblings.py --dry-run |
exit 1, File ".../scripts/siblings.py", line 906, in _run_placement, UnicodeEncodeError: 'utf-8' codec can't encode character '\ud83d' in position 11: surrogates not allowed |
the same, make siblings |
exit 2, the same traceback, make: *** [Makefile:49: siblings] Error 1 |
the same, siblings.py --make park --dry-run |
exit 1, line 676, in dispatch_all, the same error |
the same, make park / make resume |
exit 2 each (Makefile:59, Makefile:62), the same error |
name: "InkRouter", PYTHONIOENCODING=ascii, siblings.py --dry-run |
exit 1, line 906, in _run_placement, UnicodeEncodeError: 'ascii' codec can't encode character '\u2014' (the position depends on the root's path) |
name: "a\ud83db", family scripts/bootstrap.py --no-fetch --skip-members |
exit 1, the same error from its own first line (that one is #391) |
What it should do. The same two functions #391 gives bootstrap.py: escape_unencodable_stdout() as the first statement of main, and spelled(value) around every value a line prints that came from the manifest, a member row or the disk (the name and the root first, then the member rows). siblings.py already imports from bootstrap (REWRITE_TARGETS, credential, member_path, members_of, at :129), so both are one import away once #391 lands; until then they are the two functions in that PR. The member's own make command is still handed the RAW target, as #391 does for --members-make. What stays out of spelled is the file's own wording: the literal dash is for escape_unencodable_stdout to cover, which is why #391 needs both.
How to test. A holder from family.py init into local bare remotes (the holder fixture in tests/test_bootstrap_spelling.py once #391 lands, or its own). Edit family.yaml's name: and run scripts/siblings.py --dry-run and --make park --dry-run under the stdouts #391's rows use (utf-8:strict, utf-8:surrogateescape, cp1252:surrogateescape, cp1252:strict, ascii:strict), answered in bytes and decoded strictly in the encoding the run was given:
- a plain name: byte-identical to origin/main under
utf-8:strict; - a lone surrogate, ESC and CR,
日本, a Persian name with its ZWNJ (raw, as on main): exit 0, noTraceback, the first line spelled; - a member row holding an ESC or a U+2028 in a project name or path, with a member that is not checked out.
Not in this issue.
- Both roots'
bootstrap.pyfirst lines and the prints around them: templates/assembly-root/scripts/bootstrap.py and templates/family-root/scripts/bootstrap.py:mainprints the manifest'snamewith a plainprintbefore any step runs, soname: "a\ud83db"(a lone surrogate) endsmake bootstrapin aUnicodeEncodeErrortraceback, exit 1 (make: 2), and the validator that names the problem is never reached; a valid name the stdout cannot encode ends the same way #391. - The wording of
validate-family.py'snaming-unclassifiedfor such a name: it names the value and exits 1; that is a separate question.
Activity
Both roots' scripts/bootstrap.py: `main` escapes what stdout cannot e…
brettheap commentedon Oct 15, 2026
CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-10-15T23:04:56Z, for #454
Logged in
lanes/log/openRepoShape-4.mdata876d5cca75d8a13ef1dc30c08d994f14e46474b.The three reads (lane-collision-protocol Rule 1):
docs/release-notes/v1.1.0.md: refreshed at main 4cf5fb0 (49 pull requ…
tests: validate-pins.py's workflow scan skips a directory, a dangling…
validate-family.py: the holder's gate escapes what its stdout cannot …