Repository navigation
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
Description
(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:
- P25 (RV1194's, a
github.comorigin) and P27 (RV1194-cont's, agitlab.comorigin) give the same answer on adopt-project.py:_github_namereads no owner over 39 characters or repository over 100, soplan --source <50 b's>/Thingnever asksghfor a name GitHub cannot hold, no remedy offers--org <50 b's>, andcheckandexecutenever clone such a record again (#1129) #1194's head and on adopt-project.py: anorg/repo--sourcetoo long for the disk is refused as a path is, naming no GitHub repository and offering no url, so--source <300 a's>/Thingis no longer offeredhttps://github.com/<300 a's>/Thing, which can never clone (#1003) #1122's head: exit 2, noghcall, no plan written, andThe remedy sends the user toREFUSED adopt-not-the-source: --org testorg and --project Thing name testorg/Thing, and the source is <40c>/Thing: an in-place adoption keeps the source's own name, and `execute` pushes the split to the repository they name, opens its pull request there and sets its topic on it Remediation: no plan was written. Run `plan` again with `--project Thing --org <40c>`, the source's own name, which `plan` writes into the plan's `org:`, `project:` and `legs:`. ...--org <40 c's>, andexecuteagainst GitHub refuses that asadopt-org-too-long. It is the dead-end remedy adopt-project.py:_github_nametakes an owner over 39 characters or a repository over 100, soplanasksghto clone a name GitHub cannot hold, and offers its URL beside an unsearchable directory (RV1122's NIT-1 on #1122) #1129 names, reached through a reader_github_namedoes not cover. - The gitlab row shows a real remote can reach it, since GitHub's 39 does not bind another host's owner.
- Fix, the review's: apply the same two limits in
_remote_repository, so that a name past either is noorg/repo, as a path is (adopt-project.py: read<org>/<repo>from everyorigingit accepts (a local path, a Windows backslash path, a trailing/or.git/) #521). Thenplanrecordsrepository: nullfor such anorigin, and no remedy offers the name. - To settle.
url_repository's docstring calls it "THE ONE READING OF ANorigin" foradopt-project.py planand forshape-doctor.py's adoption line (origin_org, shape-doctor.py, NOT A SHAPE ROOT on a git repository: print both ways in, as AGENTS.md says, and add--orgto the adopt line when there is noorigin#545). The review names_remote_repository, which isadopt-project.py's own call of it. Putting the limits inurl_repositoryinstead would move the doctor's adoption line too. That is the writer's to say.
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 |
- RV1194's C05 and C06 show the same
plan okfromcheckfor a record of owner 40 (C05) or 50 (C06) with noorigin: exit 0,plan ok, andexecutethen stops atadopt-unconfirmed(no--yes), with noghcall and no remotes made. - The no-
originanswer is the one adopt-project.py:_github_namereads no owner over 39 characters or repository over 100, soplan --source <50 b's>/Thingnever asksghfor a name GitHub cannot hold, no remedy offers--org <50 b's>, andcheckandexecutenever clone such a record again (#1129) #1194's body states. It matches the existing rule that a record naming noowner/repoholds the plan to nothing, and a name GitHub cannot hold is no GitHub repository to hold the plan to. So the live reading is the one that disagrees. - Fix: NIT-1's. With the limits in
_remote_repository, both readings hold nothing, and bothchecks in the table give the same answer. Add this pair ofchecks (P29) to that fix's rows.
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
- P25 and P27 with
--org testorgare no longer refusedadopt-not-the-sourcewith--org <40 c's>offered. By the review's reading (not run),planrecordsrepository: nullfor thatorigin, as it does for a path. - P29's two
checks give one answer, and C05 and C06 still giveplan ok. - The limits stay GitHub's (39 for an owner, 100 for a repository, counted after the
.gitis dropped), as adopt-project.py:_github_namereads no owner over 39 characters or repository over 100, soplan --source <50 b's>/Thingnever asksghfor a name GitHub cannot hold, no remedy offers--org <50 b's>, andcheckandexecutenever clone such a record again (#1129) #1194's rows pin them, and a name at either limit is still read. - NIT-3 ends in a decision of its own: the refusal as it is, or the
./<spelling>offer.
See #1129, #1194, #1122 and #521.
Lane: openreposhape-4 (openRepoShape-4)
Activity
brettheap commentedon Nov 10, 2026
CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-11-10T01:57:24Z, for #1211
Logged in
lanes/log/openRepoShape-3.mdat05ceff9e0635b4a321f69d5ec6fa642db65f12f6.The three reads (lane-collision-protocol Rule 1):
tests/test_adopt_source_github_limits.py: `ORIGINS_PAST` holds `https…