Skip to content

shape-doctor.py: origin_org and repo_local_origin_name read only a remote named origin, so for a source whose only remote has another name the doctor's NEXT (--project WorkUpstream --org <your-org>) no longer matches what plan asks once #1280 lands (RV1280 S4 on #1280; follows #1276) #1292

Open

Description

@brettheap

(lane openRepoShape-3, 2026-11-09T22:05:03Z)

Found by: RV1280, lane 3's independent review of PR #1280 (for #1276) at 8700d2fee, finding S4 (#1280 issuecomment-6745942768). RV1280b, lane 3's delta review of #1280's fix round, found S4's line numbers right at main 4552efa6a. It is filed on Brett Heap's word "file follow-ups 5, 10 and 15" (2026-11-09). It is on v1.2.2, the patch after v1.2.1, which adds no command and no flag.

It builds after #1280 lands. #1280 (for #1276) is lane 3's, on v1.2.2, and is not on main at filing (open, head 890976c92). Its code is cited here from that head (git show of refs/pull/1280/head), so its line numbers move when it is squashed. Lines for shape-doctor.py are at main 8cf6477fe, read and not run; they are the lines RV1280b named at 4552efa6a. The measurement is RV1280's, on git 2.43.0 and Python 3.12. This body is ASCII.

What is missing

A person can see it: the doctor offers a command plan refuses. Once #1280 lands, plan reads a source's only remote when it has no origin (a source cloned under clone.defaultRemoteName). The doctor still reads origin alone, so for such a source it builds its adoption NEXT from a repository and an organisation it did not read.

RV1280 measured it (S4, quoted exactly; "the merge" is RV1280's local merge 611e10026 of #1280 8700d2fee with main ebb87168a):

S4 SHOULD, as a follow-up and not this PR: shape-doctor.py no longer asks what plan asks.

I took a repository whose only remote is upstream (testorg/Thing), in a folder named work-upstream, on the ebb8716 merge.

  • The doctor's adoption NEXT is adopt-project.py plan --source .../work-upstream --project WorkUpstream --org <your-org>.
  • For the same repository with origin, the NEXT is --project Thing with no --org.

Pasting the upstream line with --org testorg:

Plan's new refusal is correct. But the doctor's origin_org and repo_local_origin_name (shape-doctor.py around line 11423, whose docstring says it "asks the question plan asks") read origin only. File a v1.2.2 follow-up to read the only remote there as plan now does, and name it under the body's Out of scope.

So the doctor's line, filled in as it asks, ends in plan's correct refusal, where the same repository with origin gets a line that works. #1280's body at 890976c92 names the doctor only in a test-count row (grep -i doctor finds no other line); recheck at filing.

Why (the code, read and not run)

At main 8cf6477fe, shape-doctor.py:

The fix (as RV1280 framed it: "read the only remote there as plan now does"; the writer settles the open choices)

Rows (they must fail before the change)

Not here

Done when

See #1276, #1280, #521 and #545.

Lane: openreposhape-3 (openRepoShape-3)

Activity

  1. added this to the v1.2.2 milestone on Nov 9, 2026
  2. brettheap commented on Nov 9, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-11-09T22:08:49Z, for #1292

    Logged in lanes/log/openRepoShape-3.md at 92278b8f35cb66da7c992b70bace1e91ef93d83b.

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

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