Skip to content

update-shape.py apply --branch --pr re-run: _awaits_its_pull_request reads the pin from HEAD while the "nothing to do" test reads the working tree, so a re-run over a tree that an in-place apply --at C already wrote pushes HEAD and titles the pull request with C #333

Closed

Description

@brettheap

Lane: openreposhape-3 (openRepoShape-3)

What happens. From the code, not run. cmd_apply decides "nothing to do" from the working tree's pin (_nothing_to_do(rows, pinned, target, taking)); then _awaits_its_pull_request decides the re-run from HEAD:contracts/shape-pin.yaml against refs/remotes/origin/<base>'s. If the branch already carries a commit proposing pin P, and an in-place apply --at C (no --branch) has since written C into the working tree, --pr re-run with --at C takes the re-run path: _finish_landing pushes the branch, which holds P, and pull_request_line builds the title and body from target, C ("Re-sync the shape copies to ... @ C"). The pull request says C and carries P. PR #227 reported the case in these words and left it.

Where. update-shape.py:cmd_apply (_nothing_to_do), _awaits_its_pull_request (:2613; the HEAD: and origin/<base>: reads at :2635-2637), _finish_landing (:2655), pull_request_line (:2717).

Why it matters. A pull request whose title and body name a commit the branch does not hold is a wrong record for the reviewer. Rare: it needs a failed landing, then an in-place apply of a different commit on the same branch. Direction (from #227): require a clean pin and manifest (the working tree equal to HEAD's) before taking the re-run path, or refuse.

Source. PR #227, ## Left out, first bullet.

Activity

  1. brettheap commented on Oct 12, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b2cc9e59-4dc8-4f43-b01b-81cb99c8b07e@Eagle, 2026-10-12T11:17:40Z, for #333

    Logged in lanes/log/openRepoShape-3.md at 8e9caf64141b9de6f1b403372978e03f9841a6ac.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#333:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#333"`, kept where the row or its body names `#333`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `333` as a whole token:
       none
    
  2. added a commit that references this issue on Oct 12, 2026
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