Skip to content

adopt-project.py: a local source's origin past GitHub's limits (an owner over 39 characters or a repository over 100) is still read as an org/repo, so plan --org testorg is offered an --org <40 c's> that execute refuses, and check holds the same plan or not as origin is there or gone (RV1194's NIT-1 and NIT-2 on #1194) #1211

Closed

Description

@brettheap

(lane openRepoShape-4, 2026-10-23T18:00:03Z)

Found by: RV1194 and RV1194-cont, the independent review of PR #1194 (for #1129) at 900f77af (#1194 issuecomment-6365280794, #1194 (comment)). It graded #1194 READY, with no MUST and no SHOULD, and three NITs for follow-ups. NIT-1 and NIT-2 are this issue, and NIT-3 is an optional part of it. This follows #1129 and #1194.

Nothing in this issue was re-run for it. The rows, exit codes and outputs below are the review's, measured by RV1194 and RV1194-cont on #1194's head 900f77af9, on #1122's head c01c4d73d (#1194's base) and on main 961640c68. The probe ran 56 commands (plan, check and execute) on each of the three trees with the real gh kept unreachable: a logging gh stub first on PATH that refused every call, GH_TOKEN=bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false and GIT_ALLOW_PROTOCOL=file; every execute had --local-remote-dir and no --yes. #1122's head and main gave byte-identical output. Line numbers are approximate, read on main ac5f28d2a (2026-10-23): _remote_repository is at adopt-project.py about :2902, and url_repository at scripts/repo_shape.py about :2997. #1194 and #1122 are open and not on main, so this goes onto a branch after #1194 lands.

What is wrong

#1194 makes _github_name refuse an owner over 39 characters or a repository over 100 (GitHub's limits), for --source, for a plan's clone record and for a url. A local source's own origin is read by another route, and that route reads no limit: origin is read by url_repository, through _remote_repository, and not by _github_name. #1194's body lists this case as out of scope. It predates #1194, and the answer is the same on #1122's head and on #1194's head.

NIT-1: a local source's origin past the limits is still offered --org <40 c's>

Two rows, each a local source whose origin is <scheme>://<host>/<40 c's>/Thing.git, planned with --org testorg:

NIT-2: the same plan is held, or not, depending on whether origin is still there

RV1194-cont's P29: a local source whose origin is https://gitlab.com/<40 c's>/Thing.git is planned with --org <40 c's>. The plan is written (exit 0) and records repository: <40 c's>/Thing. Its org: is then edited to testorg, and check is run with origin there and with origin removed:

check #1122's head #1194's head
origin still there exit 1, plan-not-the-source, --org <40 c's> offered exit 1, the same
origin removed exit 1, plan-not-the-source, --org <40 c's> offered exit 0, plan ok

NIT-3 (optional): github.com/<40 c's>/Thing is refused even when it is a directory here

RV1194's P24: --source github.com/<40 c's>/Thing, where that is a directory here, is refused exit 2, no gh call:

REFUSED source-unresolvable: --source 'github.com/<40c>/Thing' names no `owner/repo` on github.com
Remediation: pass a local clone's path, or `org/repo`.

The same name without the host, <40 c's>/Thing, is read in place. This is the rule that already applies to a bare github.com/ spelling that names no owner/repo, and it predates #1194: RV1194-cont's P28 gets the same refusal on #1122's head for a directory ./github.com/acme/Thing/extra passed as --source github.com/acme/Thing/extra. The remedy works.

  • Fix, optional: when the spelling is a path here, have _repository_in_url's refusal say so, and offer ./<spelling>.

Done when

See #1129, #1194, #1122 and #521.

Lane: openreposhape-4 (openRepoShape-4)

Activity

  1. added this to the v1.2.1 milestone on Oct 23, 2026
  2. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-11-10T01:57:24Z, for #1211

    Logged in lanes/log/openRepoShape-3.md at 05ceff9e0635b4a321f69d5ec6fa642db65f12f6.

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

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