Repository navigation
Description
Goal: the package's openRepoShape checks $OPENREPOSHAPE_REPO, $OPENREPOSHAPE_REF and --shape-ref for a character a terminal draws as another before --version answers and before any line, git call or clone names them, with the launcher's rule and words (#837, #866). Then no line the package prints holds either value with U+202E, U+200B or any other character of #837's list, and no git command line carries one.
Filed by lane openRepoShape-2 on Brett Heap's word ("file all", 2026-10-18T14:45:31Z).
- Source: w866, lane 2's writer of openRepoShape:
--versionand two fetch refusals print$OPENREPOSHAPE_REPOand$OPENREPOSHAPE_REFwith no check, so an escape or a bidi override in either reaches the terminal as typed, and a scaffold run sends its fetch with them #866 (PR openRepoShape:$OPENREPOSHAPE_REPOand$OPENREPOSHAPE_REFare checked once, before--versionanswers and before any fetch, so a control character or a character a terminal draws as another in either is refused, never printed or sent #872), listed it under "Found and left alone": the package'sopenRepoShape --versionprints U+202E in the repository as typed and exits 0, and its control-character check does not cover install.sh and openRepoShape: a$OPENREPOSHAPE_BIN_DIR, the repository or a ref holding a bidi control, a character of no width, a soft hyphen or U+2028 is refused by its code point before any request and never echoed, so no line shows the value as another #841's characters. rv872, the independent reviewer of openRepoShape:$OPENREPOSHAPE_REPOand$OPENREPOSHAPE_REFare checked once, before--versionanswers and before any fetch, so a control character or a character a terminal draws as another in either is refused, never printed or sent #872, confirmed it by probe and left it unfiled. Both looked at--versiononly. This issue measures every package run, and finds the same two characters in the clone's lines and in the ref's refusal too. - Why it is not openRepoShape:
--versionand two fetch refusals print$OPENREPOSHAPE_REPOand$OPENREPOSHAPE_REFwith no check, so an escape or a bidi override in either reaches the terminal as typed, and a scaffold run sends its fetch with them #866's: openRepoShape:--versionand two fetch refusals print$OPENREPOSHAPE_REPOand$OPENREPOSHAPE_REFwith no check, so an escape or a bidi override in either reaches the terminal as typed, and a scaffold run sends its fetch with them #866 is the bash launcher. The package is Python insrc/openreposhape/, its checks areclone_urlandref_faultinstandard.py, and the fix is another file and another table. - Why it is a new issue: the tracking issues' rule is that a new edge case goes on a checklist (Tracking: setup, scaffold, family and the shared helpers, creating projects and families #459, Tracking: the test suite, CI and the docs #461). Brett Heap's word overrides it for this one.
path:line is at the v1.1.1 release commit 50178305, which holds #866 (c5d0bde3, PR #872) and #874 (33c5128b, PR #875).
- How it was measured: bash 5.2.21, Python 3.12.3 and git 2.43.0, each run with an explicit minimal environment, a stub
ghandcurlfirst onPATH,GH_TOKEN=bogus, an emptyGH_CONFIG_DIR,GIT_SSH_COMMAND=falseandGIT_CONFIG_GLOBAL=/dev/null. - No request left the machine: a repository was a local path, or a stub
gitthat logs its arguments and exits 128 stood first onPATH. - "The package" is a copy of
src/openreposhape/laid out as the wheel lays it, with no checkout beside it, asinstalled_copyintests/test_openreposhape_package.pymakes one.
Lines
-
--versionprints the repository as typed and exits 0, for U+202E and U+200B.- The lines are
cli.py:385,say(f"openRepoShape {stamp.version} ({repo} @ {wanted.ref})"), and, for a build with no stamp,cli.py:395, which names{repo}again. print_version(cli.py:366) callsstandard.clone_url(repo)(:382) andstandard.target(stamp)(:383) first.clone_url's check isCONTROL_RE(standard.py:72,[\x00-\x1f\x7f-\x9f]), which holds nothing above U+009F.- Measured under
LC_ALL=Cand underLC_ALL=C.UTF-8, withOPENREPOSHAPE_REPOset toacme/r, U+202E,x:- the first line is
openRepoShape 0.0.0 (acme/r, the bytesE2 80 AE,x @ main), and the exit is 0; - with U+200B the bytes are
E2 80 8Band the rest is the same; - an unstamped build prints the value a second time, in its
commitline; a stamped copy prints it once.
- the first line is
- ESC, U+009B and DEL in the same place are refused with exit 2, in both locales, with no byte of the value:
OPENREPOSHAPE_REPO is not a value this tool will put on a `git clone` command line: it starts with '-' or carries a control character. Set it to a URL or a path.Those are the launcher's words. - In a terminal, U+202E reverses how the text after it is drawn. This was not run in a terminal emulator here.
- The lines are
- A ref holding U+202E or U+200B is refused with exit 2, and the refusal prints it as typed.
ref_fault(standard.py:198) asks the length (:207), thenCONTROL_RE(:211), then the shape (:215), whose sentence (:216) quotes'{ref}'. A value with U+202E passes the control check and fails the shape, so the sentence quotes it. The docstring's "only then the SHAPE, which is safe to echo back because it has passed both" does not hold for it.- Measured with
OPENREPOSHAPE_REFset tov1, U+202E,x:--version,--doctor ., a scaffold run andshape-doctoreach exit 2 and printREFUSED: $OPENREPOSHAPE_REF is 'v1, the bytesE2 80 AE,x', which is not a branch, tag or commit .... - A scaffold run's
--shape-refdoes the same (--shape-ref is 'v1,E2 80 AE,x'). U+200B is the same withE2 80 8B. - ESC, U+009B and DEL are refused without the value (
$OPENREPOSHAPE_REF carries a control character, ...), as the launcher's are.
- Every package run that reaches the clone names the repository as typed, and hands
gitthe URL with it.- After
clone_urlpasses the value,prepare(standard.py:621) goes on. These lines each namerepo:remote_commit's refusal (:426), the note before the clone (:505), the clone's refusal (:511, the repository and the URL), the checkout's refusals (:524,:532),verify's (:617) andStandard.describe(:375,:376), whichcli.py:413,:415,:433,:469and:562print. - Measured with a stub
gitthat logs its arguments and exits 128, andOPENREPOSHAPE_REPOset toacme/r, U+202E,x:- an unstamped copy's
--doctor .and a scaffold run each calledgitonce:ls-remote -- https://github.com/acme/r,E2 80 AE,x.git HEAD HEAD^{}; - a stamped copy's
--doctor .and a scaffold run each calledgit clone --quiet --no-checkout -- https://github.com/acme/r,E2 80 AE,x.git <cache>.
- an unstamped copy's
- Measured with a local path that does not exist and U+202E in it:
--doctor .on a stamped copy printed the path 4 times on stderr (the note, the refusal's repository, its URL and git's ownfatal:line), and on an unstamped copy once;--doctor, a scaffold run andshape-doctorall exit 2. The other three tool commands sharerun_tool(cli.py:554).
- After
What is checked today
-
clone_url(standard.py:174) refuses a clone URL that starts with-or holds a character ofCONTROL_RE(:190), in the launcher's words. It runs from--version(cli.py:382) and fromprepare(standard.py:637), so from--doctor, a scaffold run and the four tool commands. -
target(standard.py:249) runschecked_ref, soref_fault, on--shape-refand then$OPENREPOSHAPE_REF. It runs from--version(cli.py:383) and fromprepare(:635). -
None of the 41 code points of the launcher's
MISDRAWN_CHARACTERS(openRepoShape:501: U+00AD, U+061C, U+200B, U+200E to U+200F, U+2028 to U+202E, U+2060 to U+206F, U+FEFF, U+FFF9 to U+FFFB, U+1D173 to U+1D17A, U+E0001) is inCONTROL_RE. Measured:clone_urlrefuses 0 of 41. -
No run reads the values beside a checkout (
preparereturns first,standard.py:631to:633;print_versionreturns atcli.py:373to:380), under--preflight(cli.py:460, beforeprepare),--installor--help. Measured:--versionbeside a checkout, with each of the five characters in either variable, exits 0 and prints neither value. -
The checks read characters, not bytes, so one value gets one answer under
CandC.UTF-8: the five characters, in each variable, were run under both, and no answer differed. A lone 0x9B byte is not UTF-8: Python reads it as a surrogate, the check passes, and--versionprints?for it with exit 0, where the launcher refuses it. A?cannot be misdrawn. -
A trailing newline (rv872's SHOULD-1 on the launcher) cannot pass here: a path, a URL, an scp address and an owner/name each ending in a line feed are refused with exit 2 (Python keeps the newline that
$(...)drops). -
The launcher, for the same values (
50178305,--version, under both locales): every one exits 2 with nothing on stdout.value in the variable package, repository package, ref launcher U+202E exit 0, printed exit 2, quoted exit 2, names U+202EU+200B exit 0, printed exit 2, quoted exit 2, names U+200BESC exit 2 exit 2 exit 2 U+009B exit 2 exit 2 exit 2 DEL exit 2 exit 2 exit 2 - The launcher's words for U+202E in the repository:
OPENREPOSHAPE_REPO holds a character a terminal draws as something other than itself (U+202E): one that is invisible, is drawn as another character, ends a line or reorders the text around it. This tool will not put it on a `git clone` command line. Set it to a URL or a path. - And in the ref:
$OPENREPOSHAPE_REF holds a character a terminal draws as something other than itself (U+202E): one that is invisible, is drawn as another character, ends a line or reorders the text around it. No branch, tag or commit this tool will pass to `git checkout` holds one.
- The launcher's words for U+202E in the repository:
-
Tests:
tests/test_openreposhape_package.pyimports 13 of the launcher's cases (LAUNCHER_CASES,:78) and none of openRepoShape:--versionand two fetch refusals print$OPENREPOSHAPE_REPOand$OPENREPOSHAPE_REFwith no check, so an escape or a bidi override in either reaches the terminal as typed, and a scaffold run sends its fetch with them #866's, and states neither behaviour above. It passes at50178305: 58 passed.
Direction
- Port the launcher's rule and words.
- The launcher's rule is
checked_repo(openRepoShape:805):misdrawn_charactersover the value as typed, then the leading-and control check. Thenref_character_fault(:908):misdrawn_characters, then the control check.refuse_bad_values(:996) calls them once, the repository first, before--version(:1151) and every other run (:1261). The list isMISDRAWN_CHARACTERS(:501), andmisdrawn_characters(:512) names the characters asU+XXXX, comma-separated, in code point order. - The package's equivalents are
clone_url's guard (standard.py:190), which ischecked_repo's second half, andref_fault's control check (:211), which isref_character_fault's second half. It has no list, no function that names the characters, and no one place: its guards stand insideclone_urlandtarget, which already come before every line that prints a value. - Add the 41 code points as a table in
standard.py, and a function that names them. Call it at the start ofclone_url, on the repository as typed, and inref_faultbetween the length check andCONTROL_RE: the launcher's order is empty, length, drawn as another, control, shape. Use the launcher's words, which are the two sentences quoted above. - Measured with a prototype of exactly these two edits (scratch only): every run in the matrix above exits 2 with no byte of the value on either stream, and
gitis called 0 times; the 58 existing package tests still pass; the prototype's table equals the launcher's list (41 and 41), and its names agree with the launcher's ownmisdrawn_characterson 1,280 of the code points inSHARING_ITS_BYTES. - Decide, and say why, whether the runs that never read the values, beside a checkout and
--preflight, refuse them too. The launcher's one check refuses in every run but--help, andcli.py:4says the package re-states the launcher: that argues for one check inmain_openreposhape, after--help. Nothing is printed or sent in those runs (measured), which argues for leaving them. This direction is the narrower one, because the guards already stand before every line that names a value.
- The launcher's rule is
- Refuse with exit 2, as the launcher does since openRepoShape:
--versionand two fetch refusals print$OPENREPOSHAPE_REPOand$OPENREPOSHAPE_REFwith no check, so an escape or a bidi override in either reaches the terminal as typed, and a scaffold run sends its fetch with them #866.Refusalis exit 2 by default (standard.py:111), and--versionalready exits 2 for ESC. No reason found to printascii(value)instead, assetup-project.py'srefuse_valuedoes: a refused value is never echoed. - The table is a copy, held equal to the launcher's by a test.
- The package ships alone. It may not read the launcher, or
scripts/repo_shape.py, at run time. - The launcher's own tests already do this for install.sh's copy (
test_install_sh_carries_the_launchers_misdrawn_check_as_it_is,tests/test_openreposhape_command.py:884), and write the code points out again asMISDRAWN(:620). - The package's test reads
MISDRAWN_CHARACTERSout ofopenRepoShapeand compares it with the table. It also names each code point ofSHARING_ITS_BYTES(:902) both ways.
- The package ships alone. It may not read the launcher, or
- Fix the words that say what
ref_faultis: its docstring (standard.py:199) and the comment at:70, so that they state the character check, the order and the launcher's words.
Verify
tests/test_openreposhape_package.pyandtests/test_openreposhape_command.pypass on Linux.- New cases, beside the 13 imported ones:
- The launcher's
UNPRINTABLE_VALUES(test_openreposhape_command.py:2245, 12 rows) run throughcmd.detached("--version", ...)underCandC.UTF-8, as data, withassert_refused_saying(:695): exit 2, that one refusal, no part of the value in either stream. Measured with a scratch module: 24 cases. At50178305, 8 fail (U+202E and U+200B, repository and ref, two locales) and 16 pass (the control rows). With the prototype all 24 pass. test_help_answers_past_a_repository_and_ref_no_line_can_print(:2314) imported unchanged: 1 case, passes at both.- A run that reaches the clone (
--doctor ., a stubgitfirst onPATH) with U+202E in the repository: refused before anygitcall, no byte of the value on either stream. Measured by hand: 1gitcall at50178305and 0 with the prototype. - One value that holds an escape and U+202E, for the repository and for the ref: the words for the drawn character come first, which pins the order.
- A clean pair still prints
openRepoShape 0.0.0 (opensoft/openRepoShape @ main)(pinned bytest_version_says_an_unstamped_build_follows_main,:423), and the launcher'sNOT_CONTROLS(:755) are not refused. Measured on four of them, an e-acute, U+200C, U+200D and a no-break space, under both locales: the prototype exits 0 and prints the same first line as the base.
- The launcher's
- Mutants, each killed (measured on the prototype, with the cases above, 68 in all):
clone_urlwithout the drawn-as-another check: 5 fail, the repository's U+202E and U+200B rows under two locales and the escape-and-U+202E case.ref_faultwithout it: 5 fail, the same for the ref.ref_faultasks the control check first: 1 fails, the escape-and-U+202E case. The 24 table cases alone do not kill it.clone_urlasks the control check first: 1 fails, the same case, alone.- The table without U+200B: 4 fail.
- The table's U+2028 to U+202E range cut at U+202D: 6 fail.
Overlaps
- No open PR touches
src/openreposhape/or its tests (checked at 2026-10-18T14:48Z). - openreposhape package:
ref_faultkeeps the old ref rule, so it takesa.lock/b,a/.b,a//b,a/b/anda., clones the standard in full and fails atgit checkout, where the launcher, setup.sh and install.sh refuse them first (#874) #941, filed beside this one forstandard.py's ref rule, editsref_faultandtests/test_openreposhape_package.pytoo. Its hunks and this one's do not touch: a three-way merge of the two prototypes'standard.pywithgit merge-fileis clean. Whichever lands second merges the other. - openRepoShape, setup.sh and install.sh: under the
Clocale a$OPENREPOSHAPE_REPOURL or path, or a ref, with a letter past ASCII is refused as "a control character", so--version,--installand--preflightrefuse what v1.1.0 ran #940, the launcher'sC-locale refusal of a non-ASCII URL or path, filed with this one, moveschecked_repoandref_character_faultto install.sh and openRepoShape: a$OPENREPOSHAPE_BIN_DIRholding:or a newline is refused byinstall.shonly after its fetch, and one holding a carriage return or an escape is placed and echoed as typed, so both refuse every control character before they fetch or print anything #760's byte rule. The package's check is by character, so it already passes a path with an e-acute underC(measured:--versionexits 0 under both locales, where the launcher exits 2 underC). Nothing here changes that answer. - Found while measuring, not this issue's:
setup.sh's--shape-refcheck (setup.sh:239to:249) has no drawn-as-another check either. UnderC.UTF-8, a copy ofsetup.shrun outside a checkout with--shape-refset tov1, U+202E,xexits 2, and its refusal quotes the value (--shape-ref is 'v1,E2 80 AE,x'). U+200B is the same withE2 80 8B. The launcher hands--shape-refto thesetup.shit fetches unread (openRepoShape:1241). UnderCthe same value is refused as "a control character" without being quoted. - The package is not a pinned shape copy, so no
upstream-changedrow follows.
Parent: #459. It holds the launcher's own items, and this is the launcher's check as the package re-states it. #866, its launcher half, is on #461.
Milestone: v1.2.0. v1.1.1 is released. Each line needs a value that the person set in their own environment, and the package already refuses the control characters in the same runs. It is not a regression.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 18, 2026
CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-18T16:12:13Z, for #939
Logged in
lanes/log/openRepoShape-3.mdat559793a3705776031eff3b5ea3c05c24254c182b.The three reads (lane-collision-protocol Rule 1):
standard.py: with both values bad, `--doctor` and a scaffold run name…