Skip to content

shape-doctor.py: the next-command lines interpolate paths without shell quoting, on every row since #96 — needs a platform-aware quoter (shlex.quote is POSIX-only; the file runs on Windows by contract) #101

Closed

Description

@brettheap

Lane: openreposhape-2 (openRepoShape-2)

Recorded, not claimed. Copilot on PR #100 asked for shell-quoting of the interpolated paths in next_command. The finding is real but is a property of every row in shape-doctor.py since #96, not of the placement row, and shlex.quote produces POSIX quoting in a file that must run on Windows. The fix is one platform-aware quoter applied across all rows (with tests for a path containing a space on both platforms), as its own object. A path with a space in a root or leg name is the failing case today.

Activity

  1. brettheap commented on Sep 11, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openreposhape-2 (openRepoShape-2), session 8fa66b30-4cf5-4b80-b40c-ac3640cf45ab, 2026-09-11T10:01Z, for the whole of this issue, branch fix/doctor-next-command-quoting.

    The three reads Rule 1 asks for, and what they returned:

    1. Claims and comments on the governing record — this issue carries no
      comment but its own opening text; nobody has claimed it. gh issue list --repo opensoft/openRepoShape --state all --search "quoting OR quote OR shell OR Windows" returns No native Windows path: setup.sh and the openRepoShape command are bash; a Python entry point, Windows CI, and the README path #49, Templates ship a .gitattributes so a Windows clone of a scaffolded project passes its own gate (follow-up of #49) #51 and README: the Layout block counts four naming families where there are five, and the rehearsal flag has no Windows spelling #68 (all CLOSED, the native-Windows
      entry point and its .gitattributes follow-up) and docs/cli.md: a flag-level CLI reference for an agent, GENERATED from every shipped tool's --help, with a hygiene test that fails when the committed file drifts from what the generator produces #97 (CLOSED,
      docs/cli.md) — none is about the doctor's next-command strings.
    2. gh pr list --repo opensoft/openRepoShape --state all — no open PR on
      this repository at all.
      The two that touch shape-doctor.py, One command answers whether a repository is compliant: openRepoShape --doctor, and the machine check becomes --preflight #96 and
      The doctor reads where a file LIVES against where the policy puts it: a placement row, code-in-spec and spec-in-code, and a plan the human resolves (#99) #100, are MERGED; The doctor reads where a file LIVES against where the policy puts it: a placement row, code-in-spec and spec-in-code, and a plan the human resolves (#99) #100 is the review this finding came out of. Nothing in
      flight can conflict.
    3. git ls-remote --heads origin | grep -iE 'quot|doctor|shell|windows' —
      one unrelated hit (fix/shim-workdir-subshell-trap, merged as openRepoShape: workdir() set its EXIT trap inside a $(...) subshell, so the temp dir was gone before setup.sh landed in it — every fetching run refused (#74) #75). The
      branch fix/doctor-next-command-quoting does not exist on the remote.

    Working in a linked worktree cut from origin/main at d249fc0; the shared
    checkout belongs to another session and is not touched. Read in full before
    authoring: shape-doctor.py, tests/test_shape_doctor.py, tests/conftest.py,
    scripts/repo_shape.py (SAFE_ARG_RE, SAFE_PATH_RE, PYTHON),
    scripts/shape_materialize.py's copy lists, setup-project.py's two-platform
    command printing (PYTHON_CMD, the os.name == "nt" branches), the
    Invoke-WebRequest rule and the README/AGENTS.md caps in
    tests/test_repo_hygiene.py, scripts/render-cli-reference.py and
    docs/cli.md, and the doctor's sections of README.md and AGENTS.md.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions