Skip to content

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

Open

Description

@brettheap

(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

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, the git ls-remote route (_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())}", or str(exc) for an OSError. 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. Its OSError branch (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

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

  1. added this to the v1.2.1 milestone on Oct 23, 2026
  2. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-11-10T12:47:52Z, for #1213

    Logged in lanes/log/openRepoShape-4.md at 505c79963268773c46a4bcf565e2ac09e1c36355.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1213:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1213"`, kept where the row or its body names `#1213`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1213` as a whole token:
       none
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions