Repository navigation
adopt-project.py, scaffold-project.py, update-shape.py, scripts/family.py and scripts/bump-leg.py: _init_refused names git init's arguments raw, two refusals print git's or gh's output raw, and exc.loudly prints a command, its directory and its output raw outside adopt-project.py (W1195's leftovers; follows #1152 and #1195) #1213
Description
(lane openRepoShape-4, 2026-10-23T18:00:03Z)
Found by: W1195, lane 4's writer of #1195 (the follow-up of PR #1177 for #1152), in its final report, section "Outside scope, not fixed". W1195 left these out on purpose, and this issue is them. This follows #1152 and #1195.
These were found by reading the code. No probe of mine ran any of them. W1195 measured only the one route it fixed (below). The sites are read on main ac5f28d2a (2026-10-23), and the line numbers are approximate. #1177 and #1195's work are not on main (see below), so each "prints raw" here is what the code on main says it does; whoever takes this should measure each with U+202E, ESC and a line feed.
What is spelled today, and what is not
- adopt-project.py: the
--planpath incheckandexecuteand the--local-remote-dirpath inexecuteare printed raw, so a bidi control in either reaches the terminal, where #1115 spells--outand--work-dirwith_shown#1152 and adopt-project.py: the--planpath incheckandexecute, and the--local-remote-dirpath inexecute'sbare, leg andsplitlines, are named with_shown, as #1154 names--outand--work-dir, so a bidi control, an escape, a line feed or a byte that is not UTF-8 in either no longer reaches the terminal as it was typed (#1152) #1177 (adopt-project.py: the--planpath incheckandexecute, and the--local-remote-dirpath inexecute'sbare, leg andsplitlines, are named with_shown, as #1154 names--outand--work-dir, so a bidi control, an escape, a line feed or a byte that is not UTF-8 in either no longer reaches the terminal as it was typed (#1152) #1177 is open and not onmain): the--planpath incheckandexecute, and the--local-remote-dirpath inexecute'sbare, leg andsplitlines, are named with_shown, as adopt-project.py:plan written toandcloning <repository> (read only) intoname the caller's--outand--work-dirwith_shown, as the other lines of the report name a path, so a bidi control, a line feed or a tab in either no longer reaches the terminal as it was typed (#1115) #1154 names--outand--work-dir. Those are the lines adopt-project.py: the--planpath incheckandexecuteand the--local-remote-dirpath inexecuteare printed raw, so a bidi control in either reaches the terminal, where #1115 spells--outand--work-dirwith_shown#1152 lists, and no more. - W1195's work for tests/test_adopt_plan_and_remote_paths_spelled.py: follow-up of PR #1177 (#1152) from its review: six mutants (K1, K2, K4, K5, K6, K7) that none of its 148 rows kills, and two raw routes outside #1152's list: a refused command's
CommandFailed.loudlystill names--local-remote-dirraw, andNEXT:prints U+200B or U+200F raw #1195 (one local commit,73c9f57e8, on adopt-project.py: the--planpath incheckandexecute, and the--local-remote-dirpath inexecute'sbare, leg andsplitlines, are named with_shown, as #1154 names--outand--work-dir, so a bidi control, an escape, a line feed or a byte that is not UTF-8 in either no longer reaches the terminal as it was typed (#1152) #1177's head5208e874e, on a branch named for tests/test_adopt_plan_and_remote_paths_spelled.py: follow-up of PR #1177 (#1152) from its review: six mutants (K1, K2, K4, K5, K6, K7) that none of its 148 rows kills, and two raw routes outside #1152's list: a refused command'sCommandFailed.loudlystill names--local-remote-dirraw, andNEXT:prints U+200B or U+200F raw #1195 in lane 4's scratch clone; at the time of filing it is not pushed and has no pull request):adopt-project.pyonly. A new_unacted(text, kept="")writes every characterstr.isprintable()refuses as an escape, with no backticks, the rule_first_saidalready uses for gh's line. A new_loudly(exc, step)rebuildsCommandFailed's REFUSED block with its arguments, its(in <cwd>)line and its output all passed through_unacted, the output keeping its line breaks. The three places inadopt-project.pythat printedexc.loudly(...)call it: the leg push (_push_the_leg),_failed_loudlyandmain's catch-all. W1195 measured it with a realexecute, a--local-remote-dirholding U+202E, and a hook that refuses every push: the raw U+202E on stderr went from 3 occurrences to 0. It leftscripts/shape_materialize.py, whereCommandFailed.loudlylives (about :1188), alone. - Not spelled, by W1195's list, which is this issue. None of the sites below calls a spelling helper for the part named.
1. _init_refused prints git init's argument list raw
adopt-project.py, _init_refused, about :11212: f"`{' '.join(exc.args_list)}` exited {exc.code}: {_spelled(exc.output)}". The output is spelled and the argument list is not. The two git init -q <probe> calls (_checks_out_symlinks about :11084 and _clone_ref_store about :11112) run on probe = tempfile.mkdtemp(prefix="symlinks-probe-", dir=work_root), so the list holds a path under the --work-dir, and a bidi control or an ESC in that path reaches the terminal through _SymlinkProbe's NOTE (#904, #910) when git init fails. #1154 spells --work-dir in plan written to and cloning ... into; this line is a third place that names it.
2. The source-unclonable and adopt-remote-unreadable refusals print git's or gh's output raw
source-unclonable,Source.clone, about :2772:f"could not clone {repository}: {exc.output.strip()[:400]}". gh's own words, up to 400 characters, with line breaks and every control character.adopt-remote-unreadable, thegit ls-remoteroute (_refuse_a_tracking_branch_the_remote_lacks, about :4988; the refusal is at about :5008 to :5019):why = f"exit {exc.code}: {' '.join(exc.output.split())}", orstr(exc)for anOSError.str.split()takes the line breaks out and nothing else, so ESC and a bidi control stay. The url beside it is spelled (remote = _spelled(urls["assembly"])), which makes the output the one raw part of the line.- For comparison, the other route to the same code,
_in_the_way_on_github(about :13602), spells gh's first line with_first_said. ItsOSErrorbranch (f"`gh` could not be run: {exc}") is raw too.
3. Four tools still print exc.loudly(...) raw
CommandFailed.loudly (scripts/shape_materialize.py, about :1188) prints the command (' '.join(self.args_list)), (in <cwd>) and the whole output, none of it spelled. #1195's work spells it in adopt-project.py's three places and nowhere else. The calls that print it raw, on main ac5f28d2a:
| File | Calls (about) |
|---|---|
scaffold-project.py |
:475, :2358 |
update-shape.py |
:5239, :5241, :5291, :6124 |
scripts/family.py |
:3334, :7387, :7511, :7534, :9186, :9350, :10174, :10566 |
scripts/bump-leg.py |
:1988, :2493 |
Each prints a REFUSED block whose command line, working directory and output can hold a path the caller typed (a --out, a --work-dir, a clone directory, a branch) or a name git or gh spelled back.
Fix
- To settle: where.
CommandFailedisshape_materialize.py's and shared by every tool. Spelling insideloudlyonce would cover every site in the table and let tests/test_adopt_plan_and_remote_paths_spelled.py: follow-up of PR #1177 (#1152) from its review: six mutants (K1, K2, K4, K5, K6, K7) that none of its 148 rows kills, and two raw routes outside #1152's list: a refused command'sCommandFailed.loudlystill names--local-remote-dirraw, andNEXT:prints U+200B or U+200F raw #1195's_loudlyinadopt-project.pyshrink to a call of it. The cost: it moves the REFUSED block of every tool, so a row that asserts a raw character in one moves with it (not measured). Spelling at each tool's call keepsloudlyas it is, and repeats the helper. One difference to settle, as tests/test_adopt_plan_and_remote_paths_spelled.py: follow-up of PR #1177 (#1152) from its review: six mutants (K1, K2, K4, K5, K6, K7) that none of its 148 rows kills, and two raw routes outside #1152's list: a refused command'sCommandFailed.loudlystill names--local-remote-dirraw, andNEXT:prints U+200B or U+200F raw #1195's work settled it inadopt-project.py:loudlyprints the whole output and_first_saidkeeps one line, so each line's characters are spelled and the line breaks between lines are kept. - Sites 1 and 2: spell the argument list in
_init_refused, and gh's and git's output in the two refusals, with the same rule (_unacted, or_first_saidwhere one line is enough). - Rows. One row per site: a hook, a stub
ghorgitthat fails with U+202E or ESC in its output or in a path it is given, and no raw U+202E (nor ESC, nor 0xff) anywhere on stdout or stderr.
Not here
W1195's fourth leftover is that _unacted and its NOTE test isprintable() only, so the characters #1171 adds to _shown get no NOTE and are not escaped in a REFUSED block. That belongs with _first_said under #1165, which is about which characters the helpers spell, where this issue is about the sites that call none. It is not repeated here.
Done when
Each site above spells what it prints, a row per site fails on a mutant that puts the raw text back, and the choice between loudly and each tool's call is written where the next writer will read it.
See #1152, #1177, #1195, #1154 and #1165.
Lane: openreposhape-4 (openRepoShape-4)
Activity
brettheap commentedon Nov 10, 2026
CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-11-10T12:47:52Z, for #1213
Logged in
lanes/log/openRepoShape-4.mdat505c79963268773c46a4bcf565e2ac09e1c36355.The three reads (lane-collision-protocol Rule 1):
tests/test_command_output_spelled.py: the config that makes the hook …