You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
shape-doctor.py: scaffold_command(…, platform) quotes for the HOST while it spells the interpreter and entry point for the REQUESTED platform — thread platform through its quote_arg calls #103
Recorded, not claimed. Found while fixing the Windows CI failure on PR #102 (commit 1f513c5's test comment says why the fixture path had to stay POSIX).
What is inconsistent.scaffold_command(shape, project, platform) (shape-doctor.py:1979) takes a platform so the Windows and POSIX spellings can each be asserted from either host. Since #102 it threads that argument to the entry-point choice (setup-project.py vs setup.sh) and to python_command(platform) (:1955), but NOT to its own quote_arg(...) calls at :2003-2006, which fall back to quote_arg's default and read the real host's os.name. So with an explicit platform, half the line follows the requested platform and half follows the host: scaffold_command(PureWindowsPath(r"C:\srv\openRepoShape"), "Atlas", "nt") renders python C:\srv\openRepoShape\setup-project.py … bare on a Windows host and python 'C:\srv\openRepoShape\setup-project.py' … quoted on Linux or macOS, for the same arguments.
Why it is only a nit today. Every real run passes platform=None, so the doctor's report and --jsonnext lines are consistent for the machine they are produced on. The override exists for the tests, and the tests avoid the seam by using a POSIX fixture path for both rows (/ is in both alphabets). Nothing a user sees is wrong.
Why it is worth closing anyway. The parameter's whole reason to exist is "spell this line for the OTHER platform", and a helper that honours that for the interpreter and the entry point but not for the quoting is a trap for the next caller (a report rendered on Linux for a Windows reader, or a --json consumer that asks for one platform's spelling). The way-in row at :2026 has the same shape.
The fix. Thread platform through every quote_arg inside scaffold_command (and any helper that takes platform and quotes), and add the test that could not be written on #102: a PureWindowsPath fixture that renders bare on nt and single-quoted on posix from ANY host, asserted byte for byte on both. render-cli-reference.py --check should be unaffected (no --help text changes).
CLAIMED — lane openreposhape-2 (openRepoShape-2), session 8706b0f5, 2026-09-11T13:10Z, for the whole of this issue, branch fix/doctor-scaffold-command-platform-quoting.
The three reads Rule 1 asks for, and what they returned:
git ls-remote --heads origin — 37 heads, none of them fix/doctor-scaffold-command-platform-quoting and none matching scaffold|quot|platform. The branch is free.
Working in a linked worktree cut from origin/main at 32450eb; the shared
checkout belongs to another session and is not touched. Read in full before
authoring: quote_arg and its two alphabets (UNQUOTED_POSIX, UNQUOTED_NT), python_command, scaffold_command, check_the_way_in, Row.__init__'s second ascii_text pass, PR #102's body and its commit 1f513c5 (why the fixture path had to stay POSIX), the quoter and scaffold
tests in tests/test_shape_doctor.py, and scripts/render-cli-reference.py
against docs/cli.md.
Activity
brettheap commentedon Sep 11, 2026
CLAIMED — lane openreposhape-2 (openRepoShape-2), session 8706b0f5, 2026-09-11T13:10Z, for the whole of this issue, branch
fix/doctor-scaffold-command-platform-quoting.The three reads Rule 1 asks for, and what they returned:
comment but its own opening text; nobody has claimed it.
gh issue list --repo opensoft/openRepoShape --state all --search "quote OR quoting OR platform OR scaffold"returns 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, the quoter this finding cameout of), No native Windows path: setup.sh and the openRepoShape command are bash; a Python entry point, Windows CI, and the README path #49/One definition for the two entry points: setup.sh becomes a shim over setup-project.py (follow-up of #49) #50 (CLOSED, the native Windows entry point and the one
definition behind the two) 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 aboutscaffold_command's own quoting.gh pr list --repo opensoft/openRepoShape --state open— no open pullrequest on this repository at all, so nothing in flight can conflict at
the file level. Two SIBLING issues are being worked in parallel from
separate worktrees on the same file: shape-doctor.py: the naming row hands repository names to argparse as bare positionals — a directory named
--helpis read as an option in both the validator call and the emitted--explainline; put--before the names #104 (thenamingrow's barepositionals) and shape-doctor.py: the drifted-file remediation says
cpon Windows, wherecpisCopy-Itemand-Pathreads[old]as a wildcard even when quoted — emitCopy-Item -LiteralPathon nt #105 (the drifted-filecpremediation on Windows).Neither touches
scaffold_command,python_command,quote_argor theway-inrow, and this lane stays inside those; the new tests go NEXT TOthe existing
scaffold_command/quoter tests intests/test_shape_doctor.pyrather than at the end of the file, so thelater rebase of all three is clean.
git ls-remote --heads origin— 37 heads, none of themfix/doctor-scaffold-command-platform-quotingand none matchingscaffold|quot|platform. The branch is free.Working in a linked worktree cut from
origin/mainat32450eb; the sharedcheckout belongs to another session and is not touched. Read in full before
authoring:
quote_argand its two alphabets (UNQUOTED_POSIX,UNQUOTED_NT),python_command,scaffold_command,check_the_way_in,Row.__init__'s secondascii_textpass, PR #102's body and its commit1f513c5(why the fixture path had to stay POSIX), the quoter and scaffoldtests in
tests/test_shape_doctor.py, andscripts/render-cli-reference.pyagainst
docs/cli.md.shape-doctor.py: `scaffold_command` quotes for the platform it was AS…
shape-doctor.py: `cp` is `Copy-Item` on Windows and its `-Path` reads…