Skip to content

tests: the quoting-sentence inventory misses a quoter passed as a value and pins functions where it means calls, and the launcher guard has no row for src/openreposhape/cli.py or setup-project.py #759

Closed

Description

@brettheap

Goal: the two guards #665 tightens hold what their comments promise for the forms they still cannot see: a host-dialect quoter reached any way but a direct call, a function with one call switched to POSIX and one not, and a tool that starts a Python child through another spelling of subprocess.

Filed by lane openRepoShape-5, from the checklist candidates in #665's PR (#724, head 151a0861). Tests only. Each line is read from source; the second also has a measured count (below).

Lands after: lane 5's #665 (PR #724, fix/665-four-guards). The inventory (host_calls, host_quoting, NAMED) and LAUNCHERS' scripts/family.py row are in that PR; main has the older shape of both. Line numbers below are at 151a0861 for the inventory and at main 66b230ed for LAUNCHERS.

Lines

  • A quoter handed on as a value is not a call, and the inventory does not see it (tests/test_readme_windows_quoting_sentence.py:141-163, host_calls; its docstring says so: "A quoter handed on as a value (map(shell_quoted, words)) is not a call and is not seen"). functools.partial(shell_line) is the same. Read from source: nothing in the shipped tools does it today (grep of the repository for map(shell_quoted, map(shell_word, map(quote_arg, partial(shell_, partial(quote_arg outside tests/ finds none), so no host-dialect line escapes the sentence now. Direction: treat a Name or Attribute that is a host quoter and is an argument of any call, or the value of an assignment the alias walk (quoter_names, :118) already follows, as a use of it, and name its function in host_quoting. Test it with the two forms above, as test_a_quoter_imported_under_another_name_is_a_host_call (:247) does for aliases.
  • The function pin counts functions, not calls. test_the_functions_that_quote_for_the_host_are_the_ones_the_sentence_names (:234-246) compares set(host_quoting(tool_sources()).get(tool, {})) with NAMED[tool], a set of function names. A function with two host-dialect calls where only one is switched to 'posix' still has a call that follows the host, so it still passes: the test cannot tell. Measured on main 66b230ed with render-cli-reference.py and tests/: the CLI reference's children write no bytecode under templates/, the launcher guard reads family.py's siblings child, the quoting-sentence inventory follows an aliased quoter, a suffixless tool and each tool's calling functions, and an S5778 pytest.raises builds its argument first (#665) #724's host_calls over scripts/family.py and setup-project.py: _switch_command 1, _print_next 1, _checked_mount_path 1, _add_command 3, _print_next_steps 2, and family_next_command 2. Only the first three are single-call functions, which is why render-cli-reference.py and tests/: the CLI reference's children write no bytecode under templates/, the launcher guard reads family.py's siblings child, the quoting-sentence inventory follows an aliased quoter, a suffixless tool and each tool's calling functions, and an S5778 pytest.raises builds its argument first (#665) #724's body says "Today the one-call functions are _switch_command, _print_next, _checked_mount_path": for the other three, one call switched to POSIX leaves the function in the set, so it is seen only if every call of it is switched. Direction: make NAMED map each function to its number of host-dialect calls and compare the counts, so one call switched in _add_command (3 to 2) fails until the sentence and the table change together.
  • LAUNCHERS has no row for src/openreposhape/cli.py or setup-project.py (tests/test_validator_child_encoding.py:610-613, two rows; interpreter_runs at :616-631 finds only subprocess.run([sys.executable, ...]) by ast.unparse(argv.elts[0]) == "sys.executable"). src/openreposhape/cli.py starts its Python children with run_child([sys.executable, str(script), ...], standard.child_environment()) at :436, :462, :474 and :564, which is neither subprocess.run nor the matched spelling; setup-project.py starts its with its own run([PYTHON, ...]) (:696, :2129, :2260, :2326, :2501; PYTHON = sys.executable at :116), whose subprocess.run at :288 takes no env=. Read from source, not measured: whether setup-project.py's children need inherited_child_environment() is the guard's own question ("a bare subprocess.run([sys.executable, ...]) takes whatever the operator's shell holds, which is the defect", :636-639), and nothing here has asked it of these two. Direction: teach interpreter_runs the two spellings (a call to run_child or to a name bound to sys.executable as the first element), add one row each, and see which fails: a failing setup-project.py row is a finding for its run, and a passing one pins what is true.

Verify: tests/test_readme_windows_quoting_sentence.py and tests/test_validator_child_encoding.py pass on Linux. Mutants, each killed by a new case: map(shell_quoted, ...) added to update-shape.py; one of _add_command's three calls switched to 'posix'; env= dropped from one run_child call in cli.py.

Overlaps. fix/665-four-guards (#724) edits both test files, so this lands after it. #711 (the Git Bash dialect, v1.1.1) will move NAMED when it changes the host question; whichever lands second re-gates against the other. scripts/family.py is edited by seven open branches (#646, #684, #686, #688, #689, #692, #693) but this issue edits no tool. No pinned file changes.

Parent: #461.

Milestone: v1.1.1. Tests only, and no shipped line is unguarded today.

🤖 Generated with Claude Code

Activity

  1. added this to the v1.1.1 milestone on Oct 17, 2026
  2. brettheap commented on Oct 17, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-17T10:25:33Z, for #759

    Logged in lanes/log/openRepoShape-5.md at ab41bb15ab5073e25828b4ebdc992d9251922378.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#759:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#759"`, kept where the row or its body names `#759`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `759` 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