Skip to content

update-shape.py: the printed git show <target>:<source> lines are not shell-quoted, and the kept-copy check (#536, #604) reads if TYPE_CHECKING:, if False: and a raising try unlike Python, and asks only if an importer is a validator #675

Closed

Description

@brettheap

Goal: the lines update-shape.py prints about a kept copy paste as printed, and its check of a kept copy's imports (#536, #604) answers as Python does where it claims to answer.

Filed by lane openRepoShape-5 on Brett Heap's word of 2026-10-16T12:17:02Z ("#458's update-shape/bump-leg (~22)"), from lines on #458: 6200820629 (R604's three lines on #616) and 6192496098 (its second line, second item: the untested try/else/finally import). Lane 4 judged the first three OPEN on main 95780dd (#473 comment 6215386495); lane 5 re-measured all four on main 879d804.

Lands after: nothing. update-shape.py is not a pinned copy, so no project re-pins. No open PR touches it.

Every line here is latent or exotic, and each says so itself: no shipped copy's path holds a blank or a quote, the validators import only repo_shape, and repo_shape.py imports no sibling copy. The issue is one small pull request if it is taken into v1.1.0 at all; leaving the four as known limits on #458 is a fair answer too.

Lines (path:line at main 879d804)

Direction

  • Quote: shlex.join(["git", "show", f"{target}:{source}"]) in both places. A plain path prints exactly as before, so the tests that hold today's text stay green, and a test with a blank and a quote in a source path (a fork's, built for the test) holds the new one.
  • Clause: say it only where no importer is a validator AND no validator imports an importer or the module, with the same ast reading the check already has (_names_imported of each validator in kind.validators).
  • Readers: do not enter an if TYPE_CHECKING: body or an if False:/if 0: body in _same_scope (a binding there is not a binding), and do not enter an if False: body in _blocks_inside; leave a statement after an unconditional raise in a try body out of _bound_at where that is a few lines, and say in the docstring that the rest stays "what this cannot tell, it does not refuse" (the module's own rule). Each reading gets its test.
  • Test gap: add the else and finally sources above to the table of "what the check is answered by".

Overlaps: none with open PRs. The issue for apply also edits update-shape.py, at Rollback._restore (:2806), _land (:4372), push_branch (:4607), _is_block_header (:1378) and current_branch (:2223), regions apart from these.

Mark each line → this issue on #458, and tick it there when this closes.

🤖 Generated with Claude Code

Activity

  1. modified the milestones: v1.1.0, v1.1.1 on Oct 16, 2026
  2. brettheap commented on Oct 17, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-17T10:25:51Z, for #675

    Logged in lanes/log/openRepoShape-3.md at 97c8061a2eb13c23bd3430ac166c9e53dcdfc17e.

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

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